From 7bb83d8ddf76b450d14190230f85a374840d1ae1 Mon Sep 17 00:00:00 2001 From: David Conrad Date: Mon, 24 May 2010 08:58:19 +0000 Subject: matroskaenc: Write codec time base as default duration for video tracks. This isn't exactly semantically equivalent, but the field has already been long abused to mean this, and writing it helps in determining a decent cfr time base when transcoding from a mkv where the video codec stores none (VP8). Originally committed as revision 23284 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/matroskaenc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavformat/matroskaenc.c') diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 2fa31bad0a..01e6e79f3f 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -566,6 +566,7 @@ static int mkv_write_tracks(AVFormatContext *s) switch (codec->codec_type) { case AVMEDIA_TYPE_VIDEO: put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_VIDEO); + put_ebml_uint(pb, MATROSKA_ID_TRACKDEFAULTDURATION, av_q2d(codec->time_base)*1E9); if (!native_id && ff_codec_get_tag(codec_movvideo_tags, codec->codec_id) && -- cgit v1.2.3