Mercurial > libavformat.hg
diff img2.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 | cdb845a57ae4 |
children | 0152b49ef2a5 |
line wrap: on
line diff
--- a/img2.c Sun Jul 17 00:28:12 2005 +0000 +++ b/img2.c Sun Jul 17 22:24:36 2005 +0000 @@ -193,8 +193,8 @@ } if(ap && ap->width && ap->height){ - st->codec.width = ap->width; - st->codec.height= ap->height; + st->codec->width = ap->width; + st->codec->height= ap->height; } if (!s->is_pipe) { @@ -209,17 +209,17 @@ } if(ap->video_codec_id){ - st->codec.codec_type = CODEC_TYPE_VIDEO; - st->codec.codec_id = ap->video_codec_id; + st->codec->codec_type = CODEC_TYPE_VIDEO; + st->codec->codec_id = ap->video_codec_id; }else if(ap->audio_codec_id){ - st->codec.codec_type = CODEC_TYPE_AUDIO; - st->codec.codec_id = ap->audio_codec_id; + st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_id = ap->audio_codec_id; }else{ - st->codec.codec_type = CODEC_TYPE_VIDEO; - st->codec.codec_id = av_str2id(img_tags, s->path); + st->codec->codec_type = CODEC_TYPE_VIDEO; + st->codec->codec_id = av_str2id(img_tags, s->path); } - if(st->codec.codec_type == CODEC_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE) - st->codec.pix_fmt = ap->pix_fmt; + if(st->codec->codec_type == CODEC_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE) + st->codec->pix_fmt = ap->pix_fmt; return 0; } @@ -231,7 +231,7 @@ int i; int size[3]={0}, ret[3]={0}; ByteIOContext f1[3], *f[3]= {&f1[0], &f1[1], &f1[2]}; - AVCodecContext *codec= &s1->streams[0]->codec; + AVCodecContext *codec= s1->streams[0]->codec; if (!s->is_pipe) { /* loop over input */ @@ -314,7 +314,7 @@ VideoData *img = s->priv_data; ByteIOContext pb1[3], *pb[3]= {&pb1[0], &pb1[1], &pb1[2]}; char filename[1024]; - AVCodecContext *codec= &s->streams[ pkt->stream_index ]->codec; + AVCodecContext *codec= s->streams[ pkt->stream_index ]->codec; int i; if (!img->is_pipe) {