Commit 5247d0d5 authored by mru's avatar mru

H264: fix index range assert() in remove_short_at_index()

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14233 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4b9d8260
...@@ -3348,7 +3348,7 @@ static Picture * find_short(H264Context *h, int frame_num, int *idx){ ...@@ -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. * @param i index into h->short_ref of picture to remove.
*/ */
static void remove_short_at_index(H264Context *h, int i){ 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; h->short_ref[i]= NULL;
if (--h->short_ref_count) if (--h->short_ref_count)
memmove(&h->short_ref[i], &h->short_ref[i+1], (h->short_ref_count - i)*sizeof(Picture*)); memmove(&h->short_ref[i], &h->short_ref[i+1], (h->short_ref_count - i)*sizeof(Picture*));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment