]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_slice.c
avcodec/rawdec: Initialize default mono palette only for bits_per_coded_sample == 1
[ffmpeg] / libavcodec / h264_slice.c
index 6395cee2db39446e969451c3a1717417455b144c..2131338a7bd9b67c005b16d9b334683db31e770e 100644 (file)
@@ -1212,6 +1212,9 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
         }
     }
 
+    if (!h->current_slice)
+        av_assert0(sl == h->slice_ctx);
+
     slice_type = get_ue_golomb_31(&sl->gb);
     if (slice_type > 9) {
         av_log(h->avctx, AV_LOG_ERROR,
@@ -1419,7 +1422,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
         }
     }
 
-    if (first_slice && h->dequant_coeff_pps != pps_id) {
+    if (!h->current_slice && h->dequant_coeff_pps != pps_id) {
         h->dequant_coeff_pps = pps_id;
         ff_h264_init_dequant_tables(h);
     }
@@ -1477,7 +1480,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
         }
     }
 
-    h->picture_structure = picture_structure;
     if (!h->setup_finished) {
         h->droppable         = droppable;
         h->picture_structure = picture_structure;