diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-23 23:43:20 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-23 23:43:20 +0000 |
commit | 5972945197d44e8bde6a986b9cba2e8196cfbc9c (patch) | |
tree | 94ba719e6f5efb53fc18d7eb38ccb96d25e7b194 /libavformat/asf.c | |
parent | c30a4489b444020ef951c1f0583afd8679c07c78 (diff) | |
download | ffmpeg-5972945197d44e8bde6a986b9cba2e8196cfbc9c.tar.gz |
convert every muxer/demuxer to write/read sample_aspect_ratio from/to
the corresponding AVStream instead of AVCodecContext
Originally committed as revision 14933 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index fc0a86eff3..6d35b8f56d 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -531,14 +531,14 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) for(i=0; i<128; i++){ int stream_num= asf->asfid2avid[i]; if(stream_num>=0){ - AVCodecContext *codec= s->streams[stream_num]->codec; - if (!codec->bit_rate) - codec->bit_rate = bitrate[i]; + AVStream *st = s->streams[stream_num]; + if (!st->codec->bit_rate) + st->codec->bit_rate = bitrate[i]; if (dar[i].num > 0 && dar[i].den > 0) - av_reduce(&codec->sample_aspect_ratio.num, - &codec->sample_aspect_ratio.den, + av_reduce(&st->sample_aspect_ratio.num, + &st->sample_aspect_ratio.den, dar[i].num, dar[i].den, INT_MAX); -//av_log(NULL, AV_LOG_ERROR, "dar %d:%d sar=%d:%d\n", dar[i].num, dar[i].den, codec->sample_aspect_ratio.num, codec->sample_aspect_ratio.den); +//av_log(NULL, AV_LOG_ERROR, "dar %d:%d sar=%d:%d\n", dar[i].num, dar[i].den, st->sample_aspect_ratio.num, st->sample_aspect_ratio.den); } } |