Mercurial > libavformat.hg
diff flic.c @ 820:feca73904e67 libavformat
changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
| author | michael |
|---|---|
| date | Sun, 17 Jul 2005 22:24:36 +0000 |
| parents | c5077fdab490 |
| children | 00a3ba030166 |
line wrap: on
line diff
--- a/flic.c Sun Jul 17 00:28:12 2005 +0000 +++ b/flic.c Sun Jul 17 22:24:36 2005 +0000 @@ -86,19 +86,19 @@ if (!st) return AVERROR_NOMEM; flic->video_stream_index = st->index; - st->codec.codec_type = CODEC_TYPE_VIDEO; - st->codec.codec_id = CODEC_ID_FLIC; - st->codec.codec_tag = 0; /* no fourcc */ - st->codec.width = LE_16(&header[0x08]); - st->codec.height = LE_16(&header[0x0A]); + st->codec->codec_type = CODEC_TYPE_VIDEO; + st->codec->codec_id = CODEC_ID_FLIC; + st->codec->codec_tag = 0; /* no fourcc */ + st->codec->width = LE_16(&header[0x08]); + st->codec->height = LE_16(&header[0x0A]); - if (!st->codec.width || !st->codec.height) + if (!st->codec->width || !st->codec->height) return AVERROR_INVALIDDATA; /* send over the whole 128-byte FLIC header */ - st->codec.extradata_size = FLIC_HEADER_SIZE; - st->codec.extradata = av_malloc(FLIC_HEADER_SIZE); - memcpy(st->codec.extradata, header, FLIC_HEADER_SIZE); + st->codec->extradata_size = FLIC_HEADER_SIZE; + st->codec->extradata = av_malloc(FLIC_HEADER_SIZE); + memcpy(st->codec->extradata, header, FLIC_HEADER_SIZE); av_set_pts_info(st, 33, 1, 90000); @@ -113,10 +113,10 @@ url_fseek(pb, 12, SEEK_SET); /* send over abbreviated FLIC header chunk */ - av_free(st->codec.extradata); - st->codec.extradata_size = 12; - st->codec.extradata = av_malloc(12); - memcpy(st->codec.extradata, header, 12); + av_free(st->codec->extradata); + st->codec->extradata_size = 12; + st->codec->extradata = av_malloc(12); + memcpy(st->codec->extradata, header, 12); } else if (magic_number == FLIC_FILE_MAGIC_1) { /*
