summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-10 23:41:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-10 23:50:08 +0100
commitd9339ab55373b12f078a3e3f1e294d8ff78652dd (patch)
tree4fac84f6bd5fa85305001b6c9358d368f51226f6 /libavcodec
parente23b18321fb5cffb6e05d0b0ef00de9733f560da (diff)
avcodec/h264: fix code that blindly dereferences NULL DPB
Fixes mixed flushing and decoding NULL packets Found-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 77a26575ad..0028227d78 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1851,7 +1851,7 @@ static int decode_update_thread_context(AVCodecContext *dst,
for (i = 0; h->DPB && i < MAX_PICTURE_COUNT; i++) {
unref_picture(h, &h->DPB[i]);
- if (h1->DPB[i].f.buf[0] &&
+ if (h1->DPB && h1->DPB[i].f.buf[0] &&
(ret = ref_picture(h, &h->DPB[i], &h1->DPB[i])) < 0)
return ret;
}