Skip to content

Commit

Permalink
avcodec/h264: Only reinit quant tables if a new PPS is allowed
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
michaelni committed Feb 24, 2015
1 parent f34aca8 commit c23a0e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavcodec/h264_slice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c23a0e7

Please sign in to comment.