aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-24 20:49:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-25 03:42:31 +0100
commit232b1f83de57057821ef2730ec9f39268cf6d015 (patch)
treee081ceadd3524e32d4f8aecce5917d0f16376ce3
parent7afb16c9a1c8d6e04d7ba084d1cd6b8557805d72 (diff)
downloadffmpeg-232b1f83de57057821ef2730ec9f39268cf6d015.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) Conflicts: libavcodec/h264_slice.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 262ea8a608..4e10b93e2e 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3616,7 +3616,7 @@ static int 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;
init_dequant_tables(h);
}