[FFmpeg-cvslog] h264: check that DPB is allocated before accessing it in flush_dpb()
Anton Khirnov
git at videolan.org
Wed Mar 13 13:39:08 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Mar 10 23:28:31 2013 +0100| [555000c7d5c1e13043a948ebc48d2939b0ba6536] | committer: Anton Khirnov
h264: check that DPB is allocated before accessing it in flush_dpb()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=555000c7d5c1e13043a948ebc48d2939b0ba6536
---
libavcodec/h264.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index de5ca40..e0d5433 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list