diff mbox

[FFmpeg-devel] libavformat/mov.c Fixed 'Error while filtering: Operation not permitted' when using -stream_loop, a short file with negativ timestamps and only one keyframe Fixes Ticket #6139

Message ID 96e2918b-ccb7-449e-cc01-665a5c18ad81@fem.tu-ilmenau.de
State New
Headers show

Commit Message

Jonas Licht June 3, 2017, 4:04 p.m. UTC
---

 libavformat/mov.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3845e63b53..afc2efe063 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6547,9 +6547,9 @@  static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp,
 {
     MOVStreamContext *sc = st->priv_data;
     int sample, time_sample;
-    int i;
-
-    int ret = mov_seek_fragment(s, st, timestamp);
+    int i,ret;
+    timestamp -= sc->time_offset;
+    ret = mov_seek_fragment(s, st, timestamp);
     if (ret < 0)
         return ret;