avformat/mov: allow seeking back to the begin even if nothing is marked as keyframe
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 25 May 2014 23:23:16 +0000 (01:23 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 31 May 2014 10:22:20 +0000 (12:22 +0200)
Fixes Ticket 3663

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 96470ca22b3b46677de0e2df64e87c5ec80d752b)

libavformat/mov.c

index 3434d4f..3fb7747 100644 (file)
@@ -2167,7 +2167,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
                 if (sc->keyframe_absent
                     && !sc->stps_count
                     && !rap_group_present
-                    && st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
+                    && (st->codec->codec_type == AVMEDIA_TYPE_AUDIO || (i==0 && j==0)))
                      keyframe = 1;
                 if (keyframe)
                     distance = 0;