diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-05-18 12:12:59 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-06-18 15:12:34 +0200 |
commit | 194be1f43ea391eb986732707435176e579265aa (patch) | |
tree | 2045d50660f7e045fde6cda7a2ed8213c24f5aab /libavformat/swfenc.c | |
parent | d754ed41727b1fcbab335b510248a9758a73320c (diff) | |
download | ffmpeg-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/swfenc.c')
-rw-r--r-- | libavformat/swfenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c index be2e5cd7d3..a1fc7b337c 100644 --- a/libavformat/swfenc.c +++ b/libavformat/swfenc.c @@ -207,6 +207,7 @@ static int swf_write_header(AVFormatContext *s) if (enc->codec_id == AV_CODEC_ID_VP6F || enc->codec_id == AV_CODEC_ID_FLV1 || enc->codec_id == AV_CODEC_ID_MJPEG) { + swf->video_st = s->streams[i]; swf->video_enc = enc; } else { av_log(s, AV_LOG_ERROR, "SWF muxer only supports VP6, FLV1 and MJPEG\n"); @@ -224,8 +225,9 @@ static int swf_write_header(AVFormatContext *s) } else { width = swf->video_enc->width; height = swf->video_enc->height; - rate = swf->video_enc->time_base.den; - rate_base = swf->video_enc->time_base.num; + // TODO: should be avg_frame_rate + rate = swf->video_st->time_base.den; + rate_base = swf->video_st->time_base.num; } if (!swf->audio_enc) |