aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-10 23:41:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-13 16:06:13 +0100
commit6fb0f37defbf5b7969f949007d8ac96dfdd26b15 (patch)
tree1e1e77e3fce8b2512a1646d1a4694a69a97be9fb
parent70028e917ce8121cd0f4eb63d38a9bbe92dc27b5 (diff)
downloadffmpeg-6fb0f37defbf5b7969f949007d8ac96dfdd26b15.tar.gz
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> (cherry picked from commit d9339ab55373b12f078a3e3f1e294d8ff78652dd) Conflicts: libavcodec/h264.c
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 1b531f560b..1d2570be56 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1839,7 +1839,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.data[0] &&
+ if (h1->DPB && h1->DPB[i].f.data[0] &&
(ret = ref_picture(h, &h->DPB[i], &h1->DPB[i])) < 0)
return ret;
}