OSDN Git Service

mov: Set the timescale for data streams
authorLuca Barbato <lu_zero@gentoo.org>
Mon, 19 Aug 2013 15:18:21 +0000 (17:18 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 19 Aug 2013 22:22:58 +0000 (00:22 +0200)
Data streams have a defined timebase, do not ignore it.

libavformat/movenc.c

index d3aa3db..b41261c 100644 (file)
@@ -3126,6 +3126,8 @@ static int mov_write_header(AVFormatContext *s)
             }
         } else if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
             track->timescale = st->codec->time_base.den;
+        } else if (st->codec->codec_type == AVMEDIA_TYPE_DATA) {
+            track->timescale = st->codec->time_base.den;
         }
         if (!track->height)
             track->height = st->codec->height;