Browse Source

h264: check that DPB is allocated before accessing it in flush_dpb()

tags/n2.0
Anton Khirnov 12 years ago
parent
commit
555000c7d5
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavcodec/h264.c

+ 3
- 2
libavcodec/h264.c View File

@@ -2623,8 +2623,9 @@ static void flush_dpb(AVCodecContext *avctx)

flush_change(h);

for (i = 0; i < MAX_PICTURE_COUNT; i++)
unref_picture(h, &h->DPB[i]);
if (h->DPB)
for (i = 0; i < MAX_PICTURE_COUNT; i++)
unref_picture(h, &h->DPB[i]);
h->cur_pic_ptr = NULL;
unref_picture(h, &h->cur_pic);



Loading…
Cancel
Save