diff options
author | David Conrad <lessen42@gmail.com> | 2010-05-24 12:58:19 +0400 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2010-05-24 12:58:19 +0400 |
commit | 7bb83d8ddf76b450d14190230f85a374840d1ae1 (patch) | |
tree | 34ee6c6356db1af82e4d16d790d472ad82c80586 /libavformat | |
parent | 31fdd641945dc5cdcfde9ee92329e22c0279981e (diff) |
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
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskaenc.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) && |