From 2117725dc56e0d20da641a3311939cf4e2ed9549 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Sat, 4 Nov 2017 18:53:26 +0000 Subject: [PATCH] lavc: Mark all AVHWAccel structures as const --- doc/APIchanges | 3 ++ libavcodec/avcodec.h | 2 +- libavcodec/cuvid_h264.c | 2 +- libavcodec/cuvid_hevc.c | 2 +- libavcodec/decode.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 +-- libavcodec/version.h | 2 +- 23 files changed, 74 insertions(+), 71 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index e29fb24172..0bde3a052d 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2017-03-23 API changes, most recent first: +2017-xx-xx - xxxxxxx - lavc 58.8.0 - avcodec.h + Add const to AVCodecContext.hwaccel. + 2017-xx-xx - xxxxxxx - lavc 58.7.0 - avcodec.h Deprecate user visibility of the AVHWAccel structure and the functions av_register_hwaccel() and av_hwaccel_next(). diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 53b5a7c4d4..7eaa0c9277 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2307,7 +2307,7 @@ typedef struct AVCodecContext { * - encoding: unused. * - decoding: Set by libavcodec */ - struct AVHWAccel *hwaccel; + const struct AVHWAccel *hwaccel; /** * Hardware accelerator context. diff --git a/libavcodec/cuvid_h264.c b/libavcodec/cuvid_h264.c index a83e4ffba0..4f36e922be 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 5de9bca483..fcf20bbcfa 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/decode.c b/libavcodec/decode.c index bc2208a3fd..12a95d4221 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -812,7 +812,7 @@ static int hwaccel_init(AVCodecContext *avctx, return AVERROR(ENOMEM); } - avctx->hwaccel = (AVHWAccel*)hwaccel; + avctx->hwaccel = hwaccel; err = hwaccel->init(avctx); if (err < 0) { av_log(avctx, AV_LOG_ERROR, "Failed setup for format %s: " diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index 8ce8c358c5..50e7863bf2 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 1d665f07d1..02d3b9b152 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 036d5baac5..6e5dff308f 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 79f758a3b9..247ea47825 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 6dee94b44f..afa86f14e4 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 0a5c0dfc76..97d4387d71 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 085d84142d..71fab77655 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 5c0a79788f..4cca00c862 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 258ae68568..5dc94a4c2d 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 8df219f7e2..8b7d49facf 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 3ccc2bd0ab..e18b1cb2df 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 037715da81..4dfe532f8a 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 8edbc44021..7c4c977b40 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 a177c00e43..3b575eb786 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 db1ba34e03..bc9ff5da8c 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 519866cf0a..87db6a767c 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 45b51304c6..1b555888ce 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, diff --git a/libavcodec/version.h b/libavcodec/version.h index 7ef743dc69..9b47110301 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,7 +28,7 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 58 -#define LIBAVCODEC_VERSION_MINOR 7 +#define LIBAVCODEC_VERSION_MINOR 8 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \