Mercurial > libavcodec.hg
changeset 7277:2bd9df0236e8 libavcodec
H264: fix index range assert() in remove_short_at_index()
author | mru |
---|---|
date | Mon, 14 Jul 2008 19:17:13 +0000 |
parents | 6163e7de8604 |
children | 6c140c15ee8c |
files | h264.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Mon Jul 14 16:18:29 2008 +0000 +++ b/h264.c Mon Jul 14 19:17:13 2008 +0000 @@ -3348,7 +3348,7 @@ * @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*));