Browse Source

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>
tags/n2.6
Michael Niedermayer 10 years ago
parent
commit
c23a0e77dd
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/h264_slice.c

+ 1
- 1
libavcodec/h264_slice.c View File

@@ -1497,7 +1497,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);
}


Loading…
Cancel
Save