mirror of https://git.ffmpeg.org/ffmpeg.git
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 c23a0e77dd
)
Conflicts:
libavcodec/h264_slice.c
This commit is contained in:
parent
7afb16c9a1
commit
232b1f83de
|
@ -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;
|
h->dequant_coeff_pps = pps_id;
|
||||||
init_dequant_tables(h);
|
init_dequant_tables(h);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue