Mercurial > libavformat.hg
diff avidec.c @ 718:ff85dfd59176 libavformat
segfault fix
| author | michael |
|---|---|
| date | Thu, 24 Mar 2005 21:27:54 +0000 |
| parents | d79164865a7c |
| children | af4e24d6310c |
line wrap: on
line diff
--- a/avidec.c Thu Mar 24 01:51:57 2005 +0000 +++ b/avidec.c Thu Mar 24 21:27:54 2005 +0000 @@ -451,7 +451,7 @@ 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; }
