aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-23 12:45:57 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-23 12:45:57 +0000
commit9170e34537bd31f0abadee874ed28a855a6a619a (patch)
tree2cfefde7fd3f580e8778875acb47363844457187 /libavcodec/h264.c
parent6847e61af387f802a2a753c6ed59b22cf321ee51 (diff)
downloadffmpeg-9170e34537bd31f0abadee874ed28a855a6a619a.tar.gz
adding assert to protect delayed_pic
Originally committed as revision 7661 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 00c3573ea1..5a5621483d 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -8341,6 +8341,9 @@ static int decode_frame(AVCodecContext *avctx,
pics = 0;
while(h->delayed_pic[pics]) pics++;
+
+ assert(pics+1 < sizeof(h->delayed_pic) / sizeof(h->delayed_pic[0]));
+
h->delayed_pic[pics++] = cur;
if(cur->reference == 0)
cur->reference = 1;