From 96470ca22b3b46677de0e2df64e87c5ec80d752b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 26 May 2014 01:23:16 +0200 Subject: [PATCH] avformat/mov: allow seeking back to the begin even if nothing is marked as keyframe Fixes Ticket 3663 Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 7203d586f9..befbfa6e0a 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2157,7 +2157,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;