[FFmpeg-cvslog] avformat/matroskaenc: do not write timebase as framerate
wm4
git at videolan.org
Fri May 4 15:36:01 EEST 2018
ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Sat Apr 28 19:24:12 2018 +0200| [022d4a2114d2586d4807f5810160f0f565ab80d7] | committer: wm4
avformat/matroskaenc: do not write timebase as framerate
If the API user doesn't set avg_frame_rate, matroskaenc will write the
current timebase as "default duration" for the video track. This makes
no sense, because the "default duration" implies the framerate of the
video. Since the timebase is forced to 1/1000, this will make the
resulting file claim 1000fps.
Drop it and don't write the element. It's optional, so it's better not
to write it if the framerate is unknown.
Strangely does not require FATE changes.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=022d4a2114d2586d4807f5810160f0f565ab80d7
---
libavformat/matroskaenc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 5950b4de44..b7ff1950d3 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1304,8 +1304,6 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
if( st->avg_frame_rate.num > 0 && st->avg_frame_rate.den > 0
&& av_cmp_q(av_inv_q(st->avg_frame_rate), st->time_base) > 0)
put_ebml_uint(pb, MATROSKA_ID_TRACKDEFAULTDURATION, 1000000000LL * st->avg_frame_rate.den / st->avg_frame_rate.num);
- else
- put_ebml_uint(pb, MATROSKA_ID_TRACKDEFAULTDURATION, 1000000000LL * st->time_base.num / st->time_base.den);
if (!native_id &&
ff_codec_get_tag(ff_codec_movvideo_tags, par->codec_id) &&
More information about the ffmpeg-cvslog
mailing list