1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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

Originally committed as revision 14233 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2008-07-14 19:17:13 +00:00
parent 283c061936
commit e1f15d3836

View File

@ -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*));