summaryrefslogtreecommitdiff
path: root/libavformat/yuv4mpegenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-05-18 12:12:59 +0200
committerAnton Khirnov <anton@khirnov.net>2014-06-18 15:12:34 +0200
commit194be1f43ea391eb986732707435176e579265aa (patch)
tree2045d50660f7e045fde6cda7a2ed8213c24f5aab /libavformat/yuv4mpegenc.c
parentd754ed41727b1fcbab335b510248a9758a73320c (diff)
downloadffmpeg-194be1f43ea391eb986732707435176e579265aa.tar.gz
lavf: switch to AVStream.time_base as the hint for the muxer timebase
Previously, AVStream.codec.time_base was used for that purpose, which was quite confusing for the callers. This change also opens the path for removing AVStream.codec. The change in the lavf-mkv test is due to the native timebase (1/1000) being used instead of the default one (1/90000), so the packets are now sent to the crc muxer in the same order in which they are demuxed (previously some of them got reordered because of inexact timestamp conversion).
Diffstat (limited to 'libavformat/yuv4mpegenc.c')
-rw-r--r--libavformat/yuv4mpegenc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c
index ed1ffea87d..abe967f177 100644
--- a/libavformat/yuv4mpegenc.c
+++ b/libavformat/yuv4mpegenc.c
@@ -38,8 +38,9 @@ static int yuv4_generate_header(AVFormatContext *s, char* buf)
width = st->codec->width;
height = st->codec->height;
- av_reduce(&raten, &rated, st->codec->time_base.den,
- st->codec->time_base.num, (1UL << 31) - 1);
+ // TODO: should be avg_frame_rate
+ av_reduce(&raten, &rated, st->time_base.den,
+ st->time_base.num, (1UL << 31) - 1);
aspectn = st->sample_aspect_ratio.num;
aspectd = st->sample_aspect_ratio.den;