[libav-devel] [PATCH 09/10] lavc: Mark all AVHWAccel structures as const

Mark Thompson sw at jkqxz.net
Sun Nov 5 01:00:08 CET 2017


---
 libavcodec/cuvid_h264.c   |  2 +-
 libavcodec/cuvid_hevc.c   |  2 +-
 libavcodec/dxva2_h264.c   |  6 ++---
 libavcodec/dxva2_hevc.c   |  6 ++---
 libavcodec/dxva2_mpeg2.c  |  6 ++---
 libavcodec/dxva2_vc1.c    | 12 ++++-----
 libavcodec/hwaccels.h     | 68 +++++++++++++++++++++++------------------------
 libavcodec/vaapi_h264.c   |  2 +-
 libavcodec/vaapi_hevc.c   |  2 +-
 libavcodec/vaapi_mpeg2.c  |  2 +-
 libavcodec/vaapi_mpeg4.c  |  4 +--
 libavcodec/vaapi_vc1.c    |  4 +--
 libavcodec/vaapi_vp8.c    |  2 +-
 libavcodec/vda_h264.c     |  4 +--
 libavcodec/vdpau_h264.c   |  2 +-
 libavcodec/vdpau_hevc.c   |  2 +-
 libavcodec/vdpau_mpeg12.c |  4 +--
 libavcodec/vdpau_mpeg4.c  |  2 +-
 libavcodec/vdpau_vc1.c    |  4 +--
 19 files changed, 68 insertions(+), 68 deletions(-)

diff --git a/libavcodec/cuvid_h264.c b/libavcodec/cuvid_h264.c
index a83e4ffba..4f36e922b 100644
--- a/libavcodec/cuvid_h264.c
+++ b/libavcodec/cuvid_h264.c
@@ -163,7 +163,7 @@ static int cuvid_h264_decode_init(AVCodecContext *avctx)
     return ff_cuvid_decode_init(avctx, sps->ref_frame_count + sps->num_reorder_frames);
 }
 
-AVHWAccel ff_h264_cuvid_hwaccel = {
+const AVHWAccel ff_h264_cuvid_hwaccel = {
     .name                 = "h264_cuvid",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_H264,
diff --git a/libavcodec/cuvid_hevc.c b/libavcodec/cuvid_hevc.c
index 5de9bca48..fcf20bbcf 100644
--- a/libavcodec/cuvid_hevc.c
+++ b/libavcodec/cuvid_hevc.c
@@ -266,7 +266,7 @@ static int cuvid_hevc_decode_init(AVCodecContext *avctx)
     return ff_cuvid_decode_init(avctx, sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + 1);
 }
 
-AVHWAccel ff_hevc_cuvid_hwaccel = {
+const AVHWAccel ff_hevc_cuvid_hwaccel = {
     .name                 = "hevc_cuvid",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_HEVC,
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 8ce8c358c..50e7863bf 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -513,7 +513,7 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx)
 }
 
 #if CONFIG_H264_DXVA2_HWACCEL
-AVHWAccel ff_h264_dxva2_hwaccel = {
+const AVHWAccel ff_h264_dxva2_hwaccel = {
     .name           = "h264_dxva2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_H264,
@@ -530,7 +530,7 @@ AVHWAccel ff_h264_dxva2_hwaccel = {
 #endif
 
 #if CONFIG_H264_D3D11VA_HWACCEL
-AVHWAccel ff_h264_d3d11va_hwaccel = {
+const AVHWAccel ff_h264_d3d11va_hwaccel = {
     .name           = "h264_d3d11va",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_H264,
@@ -547,7 +547,7 @@ AVHWAccel ff_h264_d3d11va_hwaccel = {
 #endif
 
 #if CONFIG_H264_D3D11VA2_HWACCEL
-AVHWAccel ff_h264_d3d11va2_hwaccel = {
+const AVHWAccel ff_h264_d3d11va2_hwaccel = {
     .name           = "h264_d3d11va2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_H264,
diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c
index 1d665f07d..02d3b9b15 100644
--- a/libavcodec/dxva2_hevc.c
+++ b/libavcodec/dxva2_hevc.c
@@ -422,7 +422,7 @@ static int dxva2_hevc_end_frame(AVCodecContext *avctx)
 }
 
 #if CONFIG_HEVC_DXVA2_HWACCEL
-AVHWAccel ff_hevc_dxva2_hwaccel = {
+const AVHWAccel ff_hevc_dxva2_hwaccel = {
     .name           = "hevc_dxva2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_HEVC,
@@ -439,7 +439,7 @@ AVHWAccel ff_hevc_dxva2_hwaccel = {
 #endif
 
 #if CONFIG_HEVC_D3D11VA_HWACCEL
-AVHWAccel ff_hevc_d3d11va_hwaccel = {
+const AVHWAccel ff_hevc_d3d11va_hwaccel = {
     .name           = "hevc_d3d11va",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_HEVC,
@@ -456,7 +456,7 @@ AVHWAccel ff_hevc_d3d11va_hwaccel = {
 #endif
 
 #if CONFIG_HEVC_D3D11VA2_HWACCEL
-AVHWAccel ff_hevc_d3d11va2_hwaccel = {
+const AVHWAccel ff_hevc_d3d11va2_hwaccel = {
     .name           = "hevc_d3d11va2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_HEVC,
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index 036d5baac..6e5dff308 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -318,7 +318,7 @@ static int dxva2_mpeg2_end_frame(AVCodecContext *avctx)
 }
 
 #if CONFIG_MPEG2_DXVA2_HWACCEL
-AVHWAccel ff_mpeg2_dxva2_hwaccel = {
+const AVHWAccel ff_mpeg2_dxva2_hwaccel = {
     .name           = "mpeg2_dxva2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_MPEG2VIDEO,
@@ -335,7 +335,7 @@ AVHWAccel ff_mpeg2_dxva2_hwaccel = {
 #endif
 
 #if CONFIG_MPEG2_D3D11VA_HWACCEL
-AVHWAccel ff_mpeg2_d3d11va_hwaccel = {
+const AVHWAccel ff_mpeg2_d3d11va_hwaccel = {
     .name           = "mpeg2_d3d11va",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_MPEG2VIDEO,
@@ -352,7 +352,7 @@ AVHWAccel ff_mpeg2_d3d11va_hwaccel = {
 #endif
 
 #if CONFIG_MPEG2_D3D11VA2_HWACCEL
-AVHWAccel ff_mpeg2_d3d11va2_hwaccel = {
+const AVHWAccel ff_mpeg2_d3d11va2_hwaccel = {
     .name           = "mpeg2_d3d11va2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_MPEG2VIDEO,
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index 79f758a3b..247ea4782 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -318,7 +318,7 @@ static int dxva2_vc1_end_frame(AVCodecContext *avctx)
 }
 
 #if CONFIG_WMV3_DXVA2_HWACCEL
-AVHWAccel ff_wmv3_dxva2_hwaccel = {
+const AVHWAccel ff_wmv3_dxva2_hwaccel = {
     .name           = "wmv3_dxva2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_WMV3,
@@ -335,7 +335,7 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = {
 #endif
 
 #if CONFIG_VC1_DXVA2_HWACCEL
-AVHWAccel ff_vc1_dxva2_hwaccel = {
+const AVHWAccel ff_vc1_dxva2_hwaccel = {
     .name           = "vc1_dxva2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_VC1,
@@ -352,7 +352,7 @@ AVHWAccel ff_vc1_dxva2_hwaccel = {
 #endif
 
 #if CONFIG_WMV3_D3D11VA_HWACCEL
-AVHWAccel ff_wmv3_d3d11va_hwaccel = {
+const AVHWAccel ff_wmv3_d3d11va_hwaccel = {
     .name           = "wmv3_d3d11va",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_WMV3,
@@ -369,7 +369,7 @@ AVHWAccel ff_wmv3_d3d11va_hwaccel = {
 #endif
 
 #if CONFIG_WMV3_D3D11VA2_HWACCEL
-AVHWAccel ff_wmv3_d3d11va2_hwaccel = {
+const AVHWAccel ff_wmv3_d3d11va2_hwaccel = {
     .name           = "wmv3_d3d11va2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_WMV3,
@@ -386,7 +386,7 @@ AVHWAccel ff_wmv3_d3d11va2_hwaccel = {
 #endif
 
 #if CONFIG_VC1_D3D11VA_HWACCEL
-AVHWAccel ff_vc1_d3d11va_hwaccel = {
+const AVHWAccel ff_vc1_d3d11va_hwaccel = {
     .name           = "vc1_d3d11va",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_VC1,
@@ -403,7 +403,7 @@ AVHWAccel ff_vc1_d3d11va_hwaccel = {
 #endif
 
 #if CONFIG_VC1_D3D11VA2_HWACCEL
-AVHWAccel ff_vc1_d3d11va2_hwaccel = {
+const AVHWAccel ff_vc1_d3d11va2_hwaccel = {
     .name           = "vc1_d3d11va2",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_VC1,
diff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h
index 6dee94b44..afa86f14e 100644
--- a/libavcodec/hwaccels.h
+++ b/libavcodec/hwaccels.h
@@ -21,39 +21,39 @@
 
 #include "avcodec.h"
 
-extern AVHWAccel ff_h263_vaapi_hwaccel;
-extern AVHWAccel ff_h264_cuvid_hwaccel;
-extern AVHWAccel ff_h264_d3d11va_hwaccel;
-extern AVHWAccel ff_h264_d3d11va2_hwaccel;
-extern AVHWAccel ff_h264_dxva2_hwaccel;
-extern AVHWAccel ff_h264_vaapi_hwaccel;
-extern AVHWAccel ff_h264_vda_hwaccel;
-extern AVHWAccel ff_h264_vda_old_hwaccel;
-extern AVHWAccel ff_h264_vdpau_hwaccel;
-extern AVHWAccel ff_hevc_cuvid_hwaccel;
-extern AVHWAccel ff_hevc_d3d11va_hwaccel;
-extern AVHWAccel ff_hevc_d3d11va2_hwaccel;
-extern AVHWAccel ff_hevc_dxva2_hwaccel;
-extern AVHWAccel ff_hevc_vaapi_hwaccel;
-extern AVHWAccel ff_hevc_vdpau_hwaccel;
-extern AVHWAccel ff_mpeg1_vdpau_hwaccel;
-extern AVHWAccel ff_mpeg2_d3d11va_hwaccel;
-extern AVHWAccel ff_mpeg2_d3d11va2_hwaccel;
-extern AVHWAccel ff_mpeg2_dxva2_hwaccel;
-extern AVHWAccel ff_mpeg2_vaapi_hwaccel;
-extern AVHWAccel ff_mpeg2_vdpau_hwaccel;
-extern AVHWAccel ff_mpeg4_vaapi_hwaccel;
-extern AVHWAccel ff_mpeg4_vdpau_hwaccel;
-extern AVHWAccel ff_vc1_d3d11va_hwaccel;
-extern AVHWAccel ff_vc1_d3d11va2_hwaccel;
-extern AVHWAccel ff_vc1_dxva2_hwaccel;
-extern AVHWAccel ff_vc1_vaapi_hwaccel;
-extern AVHWAccel ff_vc1_vdpau_hwaccel;
-extern AVHWAccel ff_vp8_vaapi_hwaccel;
-extern AVHWAccel ff_wmv3_d3d11va_hwaccel;
-extern AVHWAccel ff_wmv3_d3d11va2_hwaccel;
-extern AVHWAccel ff_wmv3_dxva2_hwaccel;
-extern AVHWAccel ff_wmv3_vaapi_hwaccel;
-extern AVHWAccel ff_wmv3_vdpau_hwaccel;
+extern const AVHWAccel ff_h263_vaapi_hwaccel;
+extern const AVHWAccel ff_h264_cuvid_hwaccel;
+extern const AVHWAccel ff_h264_d3d11va_hwaccel;
+extern const AVHWAccel ff_h264_d3d11va2_hwaccel;
+extern const AVHWAccel ff_h264_dxva2_hwaccel;
+extern const AVHWAccel ff_h264_vaapi_hwaccel;
+extern const AVHWAccel ff_h264_vda_hwaccel;
+extern const AVHWAccel ff_h264_vda_old_hwaccel;
+extern const AVHWAccel ff_h264_vdpau_hwaccel;
+extern const AVHWAccel ff_hevc_cuvid_hwaccel;
+extern const AVHWAccel ff_hevc_d3d11va_hwaccel;
+extern const AVHWAccel ff_hevc_d3d11va2_hwaccel;
+extern const AVHWAccel ff_hevc_dxva2_hwaccel;
+extern const AVHWAccel ff_hevc_vaapi_hwaccel;
+extern const AVHWAccel ff_hevc_vdpau_hwaccel;
+extern const AVHWAccel ff_mpeg1_vdpau_hwaccel;
+extern const AVHWAccel ff_mpeg2_d3d11va_hwaccel;
+extern const AVHWAccel ff_mpeg2_d3d11va2_hwaccel;
+extern const AVHWAccel ff_mpeg2_dxva2_hwaccel;
+extern const AVHWAccel ff_mpeg2_vaapi_hwaccel;
+extern const AVHWAccel ff_mpeg2_vdpau_hwaccel;
+extern const AVHWAccel ff_mpeg4_vaapi_hwaccel;
+extern const AVHWAccel ff_mpeg4_vdpau_hwaccel;
+extern const AVHWAccel ff_vc1_d3d11va_hwaccel;
+extern const AVHWAccel ff_vc1_d3d11va2_hwaccel;
+extern const AVHWAccel ff_vc1_dxva2_hwaccel;
+extern const AVHWAccel ff_vc1_vaapi_hwaccel;
+extern const AVHWAccel ff_vc1_vdpau_hwaccel;
+extern const AVHWAccel ff_vp8_vaapi_hwaccel;
+extern const AVHWAccel ff_wmv3_d3d11va_hwaccel;
+extern const AVHWAccel ff_wmv3_d3d11va2_hwaccel;
+extern const AVHWAccel ff_wmv3_dxva2_hwaccel;
+extern const AVHWAccel ff_wmv3_vaapi_hwaccel;
+extern const AVHWAccel ff_wmv3_vdpau_hwaccel;
 
 #endif /* AVCODEC_HWACCELS_H */
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index 0a5c0dfc7..97d4387d7 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -388,7 +388,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx,
     return 0;
 }
 
-AVHWAccel ff_h264_vaapi_hwaccel = {
+const AVHWAccel ff_h264_vaapi_hwaccel = {
     .name                 = "h264_vaapi",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_H264,
diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c
index 085d84142..71fab7765 100644
--- a/libavcodec/vaapi_hevc.c
+++ b/libavcodec/vaapi_hevc.c
@@ -423,7 +423,7 @@ static int vaapi_hevc_decode_slice(AVCodecContext *avctx,
     return 0;
 }
 
-AVHWAccel ff_hevc_vaapi_hwaccel = {
+const AVHWAccel ff_hevc_vaapi_hwaccel = {
     .name                 = "hevc_vaapi",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_HEVC,
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index 5c0a79788..4cca00c86 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -173,7 +173,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
     return 0;
 }
 
-AVHWAccel ff_mpeg2_vaapi_hwaccel = {
+const AVHWAccel ff_mpeg2_vaapi_hwaccel = {
     .name                 = "mpeg2_vaapi",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_MPEG2VIDEO,
diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c
index 258ae6856..5dc94a4c2 100644
--- a/libavcodec/vaapi_mpeg4.c
+++ b/libavcodec/vaapi_mpeg4.c
@@ -189,7 +189,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,
@@ -207,7 +207,7 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = {
 #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,
diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c
index 8df219f7e..8b7d49fac 100644
--- a/libavcodec/vaapi_vc1.c
+++ b/libavcodec/vaapi_vc1.c
@@ -388,7 +388,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer,
 }
 
 #if CONFIG_WMV3_VAAPI_HWACCEL
-AVHWAccel ff_wmv3_vaapi_hwaccel = {
+const AVHWAccel ff_wmv3_vaapi_hwaccel = {
     .name                 = "wmv3_vaapi",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_WMV3,
@@ -405,7 +405,7 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = {
 };
 #endif
 
-AVHWAccel ff_vc1_vaapi_hwaccel = {
+const AVHWAccel ff_vc1_vaapi_hwaccel = {
     .name                 = "vc1_vaapi",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_VC1,
diff --git a/libavcodec/vaapi_vp8.c b/libavcodec/vaapi_vp8.c
index 3ccc2bd0a..e18b1cb2d 100644
--- a/libavcodec/vaapi_vp8.c
+++ b/libavcodec/vaapi_vp8.c
@@ -220,7 +220,7 @@ fail:
     return err;
 }
 
-AVHWAccel ff_vp8_vaapi_hwaccel = {
+const AVHWAccel ff_vp8_vaapi_hwaccel = {
     .name                 = "vp8_vaapi",
     .type                 = AVMEDIA_TYPE_VIDEO,
     .id                   = AV_CODEC_ID_VP8,
diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c
index 037715da8..4dfe532f8 100644
--- a/libavcodec/vda_h264.c
+++ b/libavcodec/vda_h264.c
@@ -247,7 +247,7 @@ static int vda_h264_uninit(AVCodecContext *avctx)
     return 0;
 }
 
-AVHWAccel ff_h264_vda_old_hwaccel = {
+const AVHWAccel ff_h264_vda_old_hwaccel = {
     .name           = "h264_vda",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_H264,
@@ -483,7 +483,7 @@ static int vda_h264_alloc_frame(AVCodecContext *avctx, AVFrame *frame)
     return 0;
 }
 
-AVHWAccel ff_h264_vda_hwaccel = {
+const AVHWAccel ff_h264_vda_hwaccel = {
     .name           = "h264_vda",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_H264,
diff --git a/libavcodec/vdpau_h264.c b/libavcodec/vdpau_h264.c
index 8edbc4402..7c4c977b4 100644
--- a/libavcodec/vdpau_h264.c
+++ b/libavcodec/vdpau_h264.c
@@ -262,7 +262,7 @@ static int vdpau_h264_init(AVCodecContext *avctx)
     return ff_vdpau_common_init(avctx, profile, level);
 }
 
-AVHWAccel ff_h264_vdpau_hwaccel = {
+const AVHWAccel ff_h264_vdpau_hwaccel = {
     .name           = "h264_vdpau",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_H264,
diff --git a/libavcodec/vdpau_hevc.c b/libavcodec/vdpau_hevc.c
index a177c00e4..3b575eb78 100644
--- a/libavcodec/vdpau_hevc.c
+++ b/libavcodec/vdpau_hevc.c
@@ -413,7 +413,7 @@ static int vdpau_hevc_init(AVCodecContext *avctx)
     return ff_vdpau_common_init(avctx, profile, level);
 }
 
-AVHWAccel ff_hevc_vdpau_hwaccel = {
+const AVHWAccel ff_hevc_vdpau_hwaccel = {
     .name           = "hevc_vdpau",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_HEVC,
diff --git a/libavcodec/vdpau_mpeg12.c b/libavcodec/vdpau_mpeg12.c
index db1ba34e0..bc9ff5da8 100644
--- a/libavcodec/vdpau_mpeg12.c
+++ b/libavcodec/vdpau_mpeg12.c
@@ -103,7 +103,7 @@ static int vdpau_mpeg1_init(AVCodecContext *avctx)
                                 VDP_DECODER_LEVEL_MPEG1_NA);
 }
 
-AVHWAccel ff_mpeg1_vdpau_hwaccel = {
+const AVHWAccel ff_mpeg1_vdpau_hwaccel = {
     .name           = "mpeg1_vdpau",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_MPEG1VIDEO,
@@ -138,7 +138,7 @@ static int vdpau_mpeg2_init(AVCodecContext *avctx)
     return ff_vdpau_common_init(avctx, profile, VDP_DECODER_LEVEL_MPEG2_HL);
 }
 
-AVHWAccel ff_mpeg2_vdpau_hwaccel = {
+const AVHWAccel ff_mpeg2_vdpau_hwaccel = {
     .name           = "mpeg2_vdpau",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_MPEG2VIDEO,
diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c
index 519866cf0..87db6a767 100644
--- a/libavcodec/vdpau_mpeg4.c
+++ b/libavcodec/vdpau_mpeg4.c
@@ -107,7 +107,7 @@ static int vdpau_mpeg4_init(AVCodecContext *avctx)
     return ff_vdpau_common_init(avctx, profile, avctx->level);
 }
 
-AVHWAccel ff_mpeg4_vdpau_hwaccel = {
+const AVHWAccel ff_mpeg4_vdpau_hwaccel = {
     .name           = "mpeg4_vdpau",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_MPEG4,
diff --git a/libavcodec/vdpau_vc1.c b/libavcodec/vdpau_vc1.c
index 45b51304c..1b555888c 100644
--- a/libavcodec/vdpau_vc1.c
+++ b/libavcodec/vdpau_vc1.c
@@ -132,7 +132,7 @@ static int vdpau_vc1_init(AVCodecContext *avctx)
 }
 
 #if CONFIG_WMV3_VDPAU_HWACCEL
-AVHWAccel ff_wmv3_vdpau_hwaccel = {
+const AVHWAccel ff_wmv3_vdpau_hwaccel = {
     .name           = "wm3_vdpau",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_WMV3,
@@ -149,7 +149,7 @@ AVHWAccel ff_wmv3_vdpau_hwaccel = {
 };
 #endif
 
-AVHWAccel ff_vc1_vdpau_hwaccel = {
+const AVHWAccel ff_vc1_vdpau_hwaccel = {
     .name           = "vc1_vdpau",
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_VC1,
-- 
2.11.0



More information about the libav-devel mailing list