[SCM] libav/experimental: H264: fix index range assert() in remove_short_at_index()
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:25:22 UTC 2013
The following commit has been merged in the experimental branch:
commit e1f15d3836b91d9ca8a1648b9baef80435f58d3e
Author: Måns Rullgård <mans at mansr.com>
Date: Mon Jul 14 19:17:13 2008 +0000
H264: fix index range assert() in remove_short_at_index()
Originally committed as revision 14233 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7cadbee..4b69ca5 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*));
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list