]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_slice.c
lavc/dxv: Silence "Multiple ff_thread_finish_setup() calls" warnings.
[ffmpeg] / libavcodec / h264_slice.c
index e33048998a113368eba8175d968747d54ca94ad0..a346ccbc00407dd1b0783d6f349df4839e908c12 100644 (file)
@@ -946,7 +946,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
             *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
 #endif
 #if CONFIG_H264_VAAPI_HWACCEL
-            *fmt++ = AV_PIX_FMT_VAAPI_VLD;
+            *fmt++ = AV_PIX_FMT_VAAPI;
 #endif
 #if CONFIG_H264_VDA_HWACCEL
             *fmt++ = AV_PIX_FMT_VDA_VLD;
@@ -1173,7 +1173,10 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
 
     if (first_mb_in_slice == 0) { // FIXME better field boundary detection
         if (h->current_slice) {
-            av_assert0(!h->setup_finished);
+            if (h->setup_finished) {
+                av_log(h->avctx, AV_LOG_ERROR, "Too many fields\n");
+                return AVERROR_INVALIDDATA;
+            }
             if (h->cur_pic_ptr && FIELD_PICTURE(h) && h->first_field) {
                 ret = ff_h264_field_end(h, h->slice_ctx, 1);
                 h->current_slice = 0;