aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-24 20:49:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 01:52:51 +0100
commit9a63a36dc6e15f0b764425f17bb4cb8e7e61f3e7 (patch)
treec5fa8506f916854e806ba666dac5eb735a85044b
parentdb1a99a209e62d733d13cc63f9b31e74ea39df0e (diff)
downloadffmpeg-9a63a36dc6e15f0b764425f17bb4cb8e7e61f3e7.tar.gz
avcodec/h264: Only reinit quant tables if a new PPS is allowed
Fixes null pointer dereference Fixes: signal_sigsegv_3042097_3007_cov_1741463594_non_monotone_timestamps1.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c23a0e77dd492d6c794f89dbff3a438c95745e70) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264_slice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index f03ab4ebfb..d08dd1511c 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1515,7 +1515,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264Context *h0)
}
}
- if (h == h0 && h->dequant_coeff_pps != pps_id) {
+ if (first_slice && h->dequant_coeff_pps != pps_id) {
h->dequant_coeff_pps = pps_id;
h264_init_dequant_tables(h);
}