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); }