mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-06 14:15:29 +01:00
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).
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user