]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vaapi_mpeg4.c
avcodec: v4l2_m2m: fix races around freeing data on close
[ffmpeg] / libavcodec / vaapi_mpeg4.c
index f8c5ddf20953795bf2067aac75b19d63c1f89809..11860ff74742897115340017bfcc21c5c331c0f6 100644 (file)
@@ -178,7 +178,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
 }
 
 #if CONFIG_MPEG4_VAAPI_HWACCEL
-AVHWAccel ff_mpeg4_vaapi_hwaccel = {
+const AVHWAccel ff_mpeg4_vaapi_hwaccel = {
     .name                 = "mpeg4_vaapi",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_MPEG4,
@@ -189,13 +189,14 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = {
     .frame_priv_data_size = sizeof(VAAPIDecodePicture),
     .init                 = &ff_vaapi_decode_init,
     .uninit               = &ff_vaapi_decode_uninit,
+    .frame_params         = &ff_vaapi_common_frame_params,
     .priv_data_size       = sizeof(VAAPIDecodeContext),
     .caps_internal        = HWACCEL_CAP_ASYNC_SAFE,
 };
 #endif
 
 #if CONFIG_H263_VAAPI_HWACCEL
-AVHWAccel ff_h263_vaapi_hwaccel = {
+const AVHWAccel ff_h263_vaapi_hwaccel = {
     .name                 = "h263_vaapi",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_H263,
@@ -206,6 +207,7 @@ AVHWAccel ff_h263_vaapi_hwaccel = {
     .frame_priv_data_size = sizeof(VAAPIDecodePicture),
     .init                 = &ff_vaapi_decode_init,
     .uninit               = &ff_vaapi_decode_uninit,
+    .frame_params         = &ff_vaapi_common_frame_params,
     .priv_data_size       = sizeof(VAAPIDecodeContext),
     .caps_internal        = HWACCEL_CAP_ASYNC_SAFE,
 };