diff options
author | David Conrad <lessen42@gmail.com> | 2010-05-24 08:58:19 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2010-05-24 08:58:19 +0000 |
commit | 7bb83d8ddf76b450d14190230f85a374840d1ae1 (patch) | |
tree | 34ee6c6356db1af82e4d16d790d472ad82c80586 /libavformat/matroskaenc.c | |
parent | 31fdd641945dc5cdcfde9ee92329e22c0279981e (diff) | |
download | ffmpeg-streaming-7bb83d8ddf76b450d14190230f85a374840d1ae1.zip ffmpeg-streaming-7bb83d8ddf76b450d14190230f85a374840d1ae1.tar.gz |
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/matroskaenc.c')
-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 2fa31ba..01e6e79 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) && |