aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-07-14 19:17:13 +0000
committerMåns Rullgård <mans@mansr.com>2008-07-14 19:17:13 +0000
commite1f15d3836b91d9ca8a1648b9baef80435f58d3e (patch)
tree573791e5ac5b212ab788b088d8cc89b812e11eeb /libavcodec/h264.c
parent283c061936e5eaff8cd4c579370914ab9ddf0589 (diff)
downloadffmpeg-e1f15d3836b91d9ca8a1648b9baef80435f58d3e.tar.gz
H264: fix index range assert() in remove_short_at_index()
Originally committed as revision 14233 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7cadbee452..4b69ca5920 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3348,7 +3348,7 @@ static Picture * find_short(H264Context *h, int frame_num, int *idx){
* @param i index into h->short_ref of picture to remove.
*/
static void remove_short_at_index(H264Context *h, int i){
- assert(i > 0 && i < h->short_ref_count);
+ assert(i >= 0 && i < h->short_ref_count);
h->short_ref[i]= NULL;
if (--h->short_ref_count)
memmove(&h->short_ref[i], &h->short_ref[i+1], (h->short_ref_count - i)*sizeof(Picture*));