mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
adding assert to protect delayed_pic
Originally committed as revision 7661 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6847e61af3
commit
9170e34537
@ -8341,6 +8341,9 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
pics = 0;
|
pics = 0;
|
||||||
while(h->delayed_pic[pics]) pics++;
|
while(h->delayed_pic[pics]) pics++;
|
||||||
|
|
||||||
|
assert(pics+1 < sizeof(h->delayed_pic) / sizeof(h->delayed_pic[0]));
|
||||||
|
|
||||||
h->delayed_pic[pics++] = cur;
|
h->delayed_pic[pics++] = cur;
|
||||||
if(cur->reference == 0)
|
if(cur->reference == 0)
|
||||||
cur->reference = 1;
|
cur->reference = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user