changeset 6048:e507a21a9566 libavformat

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).
author conrad
date Mon, 24 May 2010 08:58:19 +0000
parents 4bedd06c54e2
children bd81aaf36a9a
files matroskaenc.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroskaenc.c	Sun May 23 23:33:38 2010 +0000
+++ b/matroskaenc.c	Mon May 24 08:58:19 2010 +0000
@@ -566,6 +566,7 @@
         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) &&