aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-03-24 21:27:54 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-03-24 21:27:54 +0000
commitd46db490b1ee887be0804572e6598291bb3fa47d (patch)
treed241e5bd7bf168c6b6ea4e2dd617e16ccb4001b6 /libavformat
parent3ce16b30f7fddec2c6a3ff046d12b5b1ffb1fb88 (diff)
downloadffmpeg-d46db490b1ee887be0804572e6598291bb3fa47d.tar.gz
segfault fix
Originally committed as revision 4079 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index bba0237903..058c88692c 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -451,7 +451,7 @@ resync:
index= av_index_search_timestamp(st, pkt->dts, 0);
e= &st->index_entries[index];
- if(e->timestamp == ast->frame_offset){
+ if(index >= 0 && e->timestamp == ast->frame_offset){
if (e->flags & AVINDEX_KEYFRAME)
pkt->flags |= PKT_FLAG_KEY;
}