summaryrefslogtreecommitdiffstats
path: root/contrib/ffmpeg/A06-edit-list-offset.patch
blob: 8c1d0a66889b55d15a8e6c37f7dd274e7033936a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2810960..71c37c2 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2321,6 +2321,9 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
         if (sc->time_offset < 0)
             sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, mov->time_scale);
         current_dts = -sc->time_offset;
+        if (sc->ctts_data && sc->ctts_count) {
+            current_dts -= sc->ctts_data[0].duration;
+        }
     }
 
     /* only use old uncompressed audio chunk demuxing when stts specifies it */