Some files in the wild have time code tracks with very negative initial
offsets.
---
 libavformat/mov.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 63049f5..2a41dd5 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1790,7 +1790,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
     AVIndexEntry *mem;
 
     /* adjust first dts according to edit list */
-    if (sc->time_offset && mov->time_scale > 0) {
+    if (sc->time_offset && mov->time_scale > 0 && st->codec->codec_type != 
AVMEDIA_TYPE_DATA) {
         if (sc->time_offset < 0)
             sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, 
mov->time_scale);
         current_dts = -sc->time_offset;
-- 
1.7.7.3

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to