mov: Fix harmless OOB read.

Convert key_off initialize to use the same sc->keyframe_count as
used elsewhere in the function.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Dale Curtis 2012-04-12 18:02:33 -07:00 committed by Michael Niedermayer
parent a9d114dc8a
commit fd165a0b31

View File

@ -1842,7 +1842,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
unsigned int stts_sample = 0;
unsigned int sample_size;
unsigned int distance = 0;
int key_off = sc->keyframes && sc->keyframes[0] == 1;
int key_off = sc->keyframe_count && sc->keyframes[0] == 1;
current_dts -= sc->dts_shift;