diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-07-17 22:24:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-07-17 22:24:36 +0000 |
commit | 01f4895c682a1752bf6d138ffb0628470e16b85a (patch) | |
tree | 56a3dfce270dad38b97c8f7ff288cc23cfac54da /libavformat/img.c | |
parent | 4c1a012e9ceb0840688c547625208e7c4b81624a (diff) | |
download | ffmpeg-01f4895c682a1752bf6d138ffb0628470e16b85a.tar.gz |
changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
Originally committed as revision 4453 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/img.c')
-rw-r--r-- | libavformat/img.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/img.c b/libavformat/img.c index c30d455d8a..b30e78eb14 100644 --- a/libavformat/img.c +++ b/libavformat/img.c @@ -134,9 +134,9 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) s->is_pipe = 1; if (!ap || !ap->time_base.num) { - st->codec.time_base= (AVRational){1,25}; + st->codec->time_base= (AVRational){1,25}; } else { - st->codec.time_base= ap->time_base; + st->codec->time_base= ap->time_base; } if (!s->is_pipe) { @@ -166,11 +166,11 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) url_fseek(f, 0, SEEK_SET); } - st->codec.codec_type = CODEC_TYPE_VIDEO; - st->codec.codec_id = CODEC_ID_RAWVIDEO; - st->codec.width = s->width; - st->codec.height = s->height; - st->codec.pix_fmt = s->pix_fmt; + st->codec->codec_type = CODEC_TYPE_VIDEO; + st->codec->codec_id = CODEC_ID_RAWVIDEO; + st->codec->width = s->width; + st->codec->height = s->height; + st->codec->pix_fmt = s->pix_fmt; s->img_size = avpicture_get_size(s->pix_fmt, (s->width+15)&(~15), (s->height+15)&(~15)); return 0; @@ -232,7 +232,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt) } else { /* XXX: computing this pts is not necessary as it is done in the generic code too */ - pkt->pts = av_rescale((int64_t)s->img_count * s1->streams[0]->codec.time_base.num, s1->streams[0]->time_base.den, s1->streams[0]->codec.time_base.den) / s1->streams[0]->time_base.num; + pkt->pts = av_rescale((int64_t)s->img_count * s1->streams[0]->codec->time_base.num, s1->streams[0]->time_base.den, s1->streams[0]->codec->time_base.den) / s1->streams[0]->time_base.num; s->img_count++; s->img_number++; return 0; @@ -276,7 +276,7 @@ static int img_set_parameters(AVFormatContext *s, AVFormatParameters *ap) return -1; img->img_fmt = img_fmt; img->pix_fmt = i; - st->codec.pix_fmt = img->pix_fmt; + st->codec->pix_fmt = img->pix_fmt; return 0; } @@ -306,8 +306,8 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt) char filename[1024]; AVImageInfo info; - width = st->codec.width; - height = st->codec.height; + width = st->codec->width; + height = st->codec->height; picture = (AVPicture *)pkt->data; @@ -323,7 +323,7 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt) } info.width = width; info.height = height; - info.pix_fmt = st->codec.pix_fmt; + info.pix_fmt = st->codec->pix_fmt; info.interleaved = 0; /* FIXME: there should be a way to set it right */ info.pict = *picture; ret = av_write_image(pb, img->img_fmt, &info); |