summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-12 06:32:51 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-12 06:42:04 +0100
commita0911b059763b8f13c70adcbbe71e10382855104 (patch)
tree744b1c8e19539a1035f8b427db1f6064a1aca947
parent058a3d65427e48b086011d79efb0b0dd85cd3a79 (diff)
avformat/mov: fix keyframe flags for sample from chromium Issue 340865
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mov.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f07c6b30ce..85f5f830a3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2162,6 +2162,11 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
rap_group_index++;
}
}
+ if (sc->keyframe_absent
+ && !sc->stps_count
+ && !rap_group_present
+ && st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
+ keyframe = 1;
if (keyframe)
distance = 0;
sample_size = sc->stsz_sample_size > 0 ? sc->stsz_sample_size : sc->sample_sizes[current_sample];