aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-24 16:16:38 +0200
committerMartin Storsjö <martin@martin.st>2011-09-24 18:08:39 +0300
commit2b4e49d4281690db67073ba644ad2ffc17767cdf (patch)
tree141cd2f4d1ef1f1d384110af18b66d1181ac1961
parent87a74f478f1c9ff21c2c0101a498506ce6b1d631 (diff)
downloadffmpeg-2b4e49d4281690db67073ba644ad2ffc17767cdf.tar.gz
flvdec: Fix invalid pointer deferences when parsing index
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/flvdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 569d7343c3..474c4d8658 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -196,8 +196,8 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream
}
}
- if (timeslen == fileposlen)
- for(i = 0; i < arraylen; i++)
+ if (!ret && timeslen == fileposlen)
+ for (i = 0; i < fileposlen; i++)
av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME);
else
av_log(s, AV_LOG_WARNING, "Invalid keyframes object, skipping.\n");