1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec: Mark init and close functions as av_cold

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-03-06 18:28:57 +01:00
parent 81ca85a087
commit 5ad86d5fbc
34 changed files with 54 additions and 52 deletions

View File

@ -151,7 +151,7 @@ static int d3d12va_av1_end_frame(AVCodecContext *avctx)
return ret; return ret;
} }
static int d3d12va_av1_decode_init(AVCodecContext *avctx) static av_cold int d3d12va_av1_decode_init(AVCodecContext *avctx)
{ {
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
D3D12AV1DecodeContext *av1_ctx = D3D12_AV1_DECODE_CONTEXT(avctx); D3D12AV1DecodeContext *av1_ctx = D3D12_AV1_DECODE_CONTEXT(avctx);
@ -179,7 +179,7 @@ static int d3d12va_av1_decode_init(AVCodecContext *avctx)
return 0; return 0;
} }
static int d3d12va_av1_decode_uninit(AVCodecContext *avctx) static av_cold int d3d12va_av1_decode_uninit(AVCodecContext *avctx)
{ {
D3D12AV1DecodeContext *ctx = D3D12_AV1_DECODE_CONTEXT(avctx); D3D12AV1DecodeContext *ctx = D3D12_AV1_DECODE_CONTEXT(avctx);

View File

@ -280,7 +280,7 @@ int ff_d3d12va_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames
return 0; return 0;
} }
int ff_d3d12va_decode_init(AVCodecContext *avctx) av_cold int ff_d3d12va_decode_init(AVCodecContext *avctx)
{ {
int ret; int ret;
AVHWFramesContext *frames_ctx; AVHWFramesContext *frames_ctx;
@ -370,7 +370,7 @@ fail:
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
int ff_d3d12va_decode_uninit(AVCodecContext *avctx) av_cold int ff_d3d12va_decode_uninit(AVCodecContext *avctx)
{ {
int num_allocator = 0; int num_allocator = 0;
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);

View File

@ -173,7 +173,7 @@ static int d3d12va_h264_end_frame(AVCodecContext *avctx)
return ret; return ret;
} }
static int d3d12va_h264_decode_init(AVCodecContext *avctx) static av_cold int d3d12va_h264_decode_init(AVCodecContext *avctx)
{ {
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
DXVA_PicParams_H264 pp; DXVA_PicParams_H264 pp;

View File

@ -160,7 +160,7 @@ static int d3d12va_hevc_end_frame(AVCodecContext *avctx)
scale ? &ctx_pic->qm : NULL, scale ? sizeof(ctx_pic->qm) : 0, update_input_arguments); scale ? &ctx_pic->qm : NULL, scale ? sizeof(ctx_pic->qm) : 0, update_input_arguments);
} }
static int d3d12va_hevc_decode_init(AVCodecContext *avctx) static av_cold int d3d12va_hevc_decode_init(AVCodecContext *avctx)
{ {
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
DXVA_PicParams_HEVC pp; DXVA_PicParams_HEVC pp;

View File

@ -150,7 +150,7 @@ static int d3d12va_mpeg2_end_frame(AVCodecContext *avctx)
return ret; return ret;
} }
static int d3d12va_mpeg2_decode_init(AVCodecContext *avctx) static av_cold int d3d12va_mpeg2_decode_init(AVCodecContext *avctx)
{ {
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);

View File

@ -162,7 +162,7 @@ static int d3d12va_vc1_end_frame(AVCodecContext *avctx)
update_input_arguments); update_input_arguments);
} }
static int d3d12va_vc1_decode_init(AVCodecContext *avctx) static av_cold int d3d12va_vc1_decode_init(AVCodecContext *avctx)
{ {
int ret; int ret;
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);

View File

@ -126,7 +126,7 @@ static int d3d12va_vp9_end_frame(AVCodecContext *avctx)
&ctx_pic->pp, sizeof(ctx_pic->pp), NULL, 0, update_input_arguments); &ctx_pic->pp, sizeof(ctx_pic->pp), NULL, 0, update_input_arguments);
} }
static int d3d12va_vp9_decode_init(AVCodecContext *avctx) static av_cold int d3d12va_vp9_decode_init(AVCodecContext *avctx)
{ {
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
DXVA_PicParams_VP9 pp; DXVA_PicParams_VP9 pp;

View File

@ -199,7 +199,7 @@ static av_cold void dcaenc_init_static_tables(void)
create_enc_table(&bitalloc_12_table[i][1], 12, &src_table); create_enc_table(&bitalloc_12_table[i][1], 12, &src_table);
} }
static int encode_init(AVCodecContext *avctx) static av_cold int encode_init(AVCodecContext *avctx)
{ {
static AVOnce init_static_once = AV_ONCE_INIT; static AVOnce init_static_once = AV_ONCE_INIT;
DCAEncContext *c = avctx->priv_data; DCAEncContext *c = avctx->priv_data;

View File

@ -442,7 +442,7 @@ static int bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf)
return 0; return 0;
} }
static int dvdsub_init(AVCodecContext *avctx) static av_cold int dvdsub_init(AVCodecContext *avctx)
{ {
DVDSubtitleContext *dvdc = avctx->priv_data; DVDSubtitleContext *dvdc = avctx->priv_data;
static const uint32_t default_palette[16] = { static const uint32_t default_palette[16] = {

View File

@ -1053,7 +1053,7 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame,
return avpkt->size; return avpkt->size;
} }
static int dxv_init(AVCodecContext *avctx) static av_cold int dxv_init(AVCodecContext *avctx)
{ {
DXVContext *ctx = avctx->priv_data; DXVContext *ctx = avctx->priv_data;
int ret = av_image_check_size(avctx->width, avctx->height, 0, avctx); int ret = av_image_check_size(avctx->width, avctx->height, 0, avctx);
@ -1073,7 +1073,7 @@ static int dxv_init(AVCodecContext *avctx)
return 0; return 0;
} }
static int dxv_close(AVCodecContext *avctx) static av_cold int dxv_close(AVCodecContext *avctx)
{ {
DXVContext *ctx = avctx->priv_data; DXVContext *ctx = avctx->priv_data;

View File

@ -450,7 +450,7 @@ static int dxva2_av1_end_frame(AVCodecContext *avctx)
return ret; return ret;
} }
static int dxva2_av1_uninit(AVCodecContext *avctx) static av_cold int dxva2_av1_uninit(AVCodecContext *avctx)
{ {
struct AV1DXVAContext *ctx = avctx->internal->hwaccel_priv_data; struct AV1DXVAContext *ctx = avctx->internal->hwaccel_priv_data;

View File

@ -909,7 +909,7 @@ av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,
return av_pix_fmt_get_chroma_sub_sample(pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift); return av_pix_fmt_get_chroma_sub_sample(pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift);
} }
static int encode_init_internal(AVCodecContext *avctx) static av_cold int encode_init_internal(AVCodecContext *avctx)
{ {
int ret; int ret;
FFV1Context *s = avctx->priv_data; FFV1Context *s = avctx->priv_data;

View File

@ -144,7 +144,7 @@ static int libaribb24_generate_ass_header(AVCodecContext *avctx)
return 0; return 0;
} }
static int libaribb24_init(AVCodecContext *avctx) static av_cold int libaribb24_init(AVCodecContext *avctx)
{ {
Libaribb24Context *b24 = avctx->priv_data; Libaribb24Context *b24 = avctx->priv_data;
void(* arib_dec_init)(arib_decoder_t* decoder) = NULL; void(* arib_dec_init)(arib_decoder_t* decoder) = NULL;
@ -197,7 +197,7 @@ static int libaribb24_init(AVCodecContext *avctx)
return 0; return 0;
} }
static int libaribb24_close(AVCodecContext *avctx) static av_cold int libaribb24_close(AVCodecContext *avctx)
{ {
Libaribb24Context *b24 = avctx->priv_data; Libaribb24Context *b24 = avctx->priv_data;

View File

@ -939,7 +939,7 @@ static void aribcaption_flush(AVCodecContext *avctx)
ctx->readorder = 0; ctx->readorder = 0;
} }
static int aribcaption_close(AVCodecContext *avctx) static av_cold int aribcaption_close(AVCodecContext *avctx)
{ {
ARIBCaptionContext *ctx = avctx->priv_data; ARIBCaptionContext *ctx = avctx->priv_data;
@ -954,7 +954,7 @@ static int aribcaption_close(AVCodecContext *avctx)
return 0; return 0;
} }
static int aribcaption_init(AVCodecContext *avctx) static av_cold int aribcaption_init(AVCodecContext *avctx)
{ {
ARIBCaptionContext *ctx = avctx->priv_data; ARIBCaptionContext *ctx = avctx->priv_data;
aribcc_profile_t profile; aribcc_profile_t profile;

View File

@ -35,7 +35,8 @@ typedef struct OggVorbisDecContext {
static int oggvorbis_decode_close(AVCodecContext *avccontext); static int oggvorbis_decode_close(AVCodecContext *avccontext);
static int oggvorbis_decode_init(AVCodecContext *avccontext) { static av_cold int oggvorbis_decode_init(AVCodecContext *avccontext)
{
OggVorbisDecContext *context = avccontext->priv_data ; OggVorbisDecContext *context = avccontext->priv_data ;
uint8_t *p= avccontext->extradata; uint8_t *p= avccontext->extradata;
int i, hsizes[3], ret; int i, hsizes[3], ret;
@ -198,7 +199,8 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, AVFrame *frame,
} }
static int oggvorbis_decode_close(AVCodecContext *avccontext) { static av_cold int oggvorbis_decode_close(AVCodecContext *avccontext)
{
OggVorbisDecContext *context = avccontext->priv_data ; OggVorbisDecContext *context = avccontext->priv_data ;
vorbis_block_clear(&context->vb); vorbis_block_clear(&context->vb);

View File

@ -213,7 +213,7 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe,
return avpkt->size; return avpkt->size;
} }
static int lscr_decode_close(AVCodecContext *avctx) static av_cold int lscr_decode_close(AVCodecContext *avctx)
{ {
LSCRContext *s = avctx->priv_data; LSCRContext *s = avctx->priv_data;
@ -225,7 +225,7 @@ static int lscr_decode_close(AVCodecContext *avctx)
return 0; return 0;
} }
static int lscr_decode_init(AVCodecContext *avctx) static av_cold int lscr_decode_init(AVCodecContext *avctx)
{ {
LSCRContext *s = avctx->priv_data; LSCRContext *s = avctx->priv_data;
@ -242,7 +242,7 @@ static int lscr_decode_init(AVCodecContext *avctx)
return ff_inflate_init(&s->zstream, avctx); return ff_inflate_init(&s->zstream, avctx);
} }
static void lscr_decode_flush(AVCodecContext *avctx) static av_cold void lscr_decode_flush(AVCodecContext *avctx)
{ {
LSCRContext *s = avctx->priv_data; LSCRContext *s = avctx->priv_data;
av_frame_unref(s->last_picture); av_frame_unref(s->last_picture);

View File

@ -1226,7 +1226,7 @@ static int mf_close(AVCodecContext *avctx)
return 0; return 0;
} }
static int mf_init(AVCodecContext *avctx) static av_cold int mf_init(AVCodecContext *avctx)
{ {
int ret; int ret;
if ((ret = mf_load_library(avctx)) == 0) { if ((ret = mf_load_library(avctx)) == 0) {

View File

@ -319,7 +319,7 @@ static int microdvd_decode_frame(AVCodecContext *avctx, AVSubtitle *sub,
return avpkt->size; return avpkt->size;
} }
static int microdvd_init(AVCodecContext *avctx) static av_cold int microdvd_init(AVCodecContext *avctx)
{ {
int i, sidx; int i, sidx;
AVBPrint font_buf; AVBPrint font_buf;

View File

@ -443,7 +443,7 @@ static int text_to_ass(AVBPrint *buf, const char *text, const char *text_end,
return 0; return 0;
} }
static int mov_text_init(AVCodecContext *avctx) { static av_cold int mov_text_init(AVCodecContext *avctx) {
/* /*
* TODO: Handle the default text style. * TODO: Handle the default text style.
* NB: Most players ignore styles completely, with the result that * NB: Most players ignore styles completely, with the result that
@ -561,7 +561,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx, AVSubtitle *sub,
return avpkt->size; return avpkt->size;
} }
static int mov_text_decode_close(AVCodecContext *avctx) static av_cold int mov_text_decode_close(AVCodecContext *avctx)
{ {
MovTextContext *m = avctx->priv_data; MovTextContext *m = avctx->priv_data;
mov_text_cleanup_ftab(m); mov_text_cleanup_ftab(m);
@ -569,7 +569,7 @@ static int mov_text_decode_close(AVCodecContext *avctx)
return 0; return 0;
} }
static void mov_text_flush(AVCodecContext *avctx) static av_cold void mov_text_flush(AVCodecContext *avctx)
{ {
MovTextContext *m = avctx->priv_data; MovTextContext *m = avctx->priv_data;
if (!(avctx->flags2 & AV_CODEC_FLAG2_RO_FLUSH_NOOP)) if (!(avctx->flags2 & AV_CODEC_FLAG2_RO_FLUSH_NOOP))

View File

@ -779,7 +779,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
return 0; return 0;
} }
static void decode_flush(AVCodecContext *avctx) static av_cold void decode_flush(AVCodecContext *avctx)
{ {
RASCContext *s = avctx->priv_data; RASCContext *s = avctx->priv_data;

View File

@ -123,7 +123,7 @@ static int rkmpp_write_data(AVCodecContext *avctx, uint8_t *buffer, int size, in
return ret; return ret;
} }
static int rkmpp_close_decoder(AVCodecContext *avctx) static av_cold int rkmpp_close_decoder(AVCodecContext *avctx)
{ {
RKMPPDecodeContext *rk_context = avctx->priv_data; RKMPPDecodeContext *rk_context = avctx->priv_data;
av_refstruct_unref(&rk_context->decoder); av_refstruct_unref(&rk_context->decoder);
@ -149,7 +149,7 @@ static void rkmpp_release_decoder(AVRefStructOpaque unused, void *obj)
av_buffer_unref(&decoder->device_ref); av_buffer_unref(&decoder->device_ref);
} }
static int rkmpp_init_decoder(AVCodecContext *avctx) static av_cold int rkmpp_init_decoder(AVCodecContext *avctx)
{ {
RKMPPDecodeContext *rk_context = avctx->priv_data; RKMPPDecodeContext *rk_context = avctx->priv_data;
RKMPPDecoder *decoder = NULL; RKMPPDecoder *decoder = NULL;
@ -517,7 +517,7 @@ static int rkmpp_receive_frame(AVCodecContext *avctx, AVFrame *frame)
return rkmpp_retrieve_frame(avctx, frame); return rkmpp_retrieve_frame(avctx, frame);
} }
static void rkmpp_flush(AVCodecContext *avctx) static av_cold void rkmpp_flush(AVCodecContext *avctx)
{ {
RKMPPDecodeContext *rk_context = avctx->priv_data; RKMPPDecodeContext *rk_context = avctx->priv_data;
RKMPPDecoder *decoder = rk_context->decoder; RKMPPDecoder *decoder = rk_context->decoder;

View File

@ -788,7 +788,7 @@ post_skip :
} }
} }
static int rpza_encode_init(AVCodecContext *avctx) static av_cold int rpza_encode_init(AVCodecContext *avctx)
{ {
RpzaContext *s = avctx->priv_data; RpzaContext *s = avctx->priv_data;
@ -847,7 +847,7 @@ static int rpza_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return 0; return 0;
} }
static int rpza_encode_end(AVCodecContext *avctx) static av_cold int rpza_encode_end(AVCodecContext *avctx)
{ {
RpzaContext *s = (RpzaContext *)avctx->priv_data; RpzaContext *s = (RpzaContext *)avctx->priv_data;

View File

@ -321,7 +321,7 @@ static void sbc_synthesize_audio(struct sbc_decoder_state *state,
} }
} }
static int sbc_decode_init(AVCodecContext *avctx) static av_cold int sbc_decode_init(AVCodecContext *avctx)
{ {
SBCDecContext *sbc = avctx->priv_data; SBCDecContext *sbc = avctx->priv_data;
int i, ch; int i, ch;

View File

@ -515,7 +515,7 @@ static void smc_encode_stream(SMCContext *s, const AVFrame *frame,
} }
} }
static int smc_encode_init(AVCodecContext *avctx) static av_cold int smc_encode_init(AVCodecContext *avctx)
{ {
SMCContext *s = avctx->priv_data; SMCContext *s = avctx->priv_data;
@ -580,7 +580,7 @@ static int smc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return 0; return 0;
} }
static int smc_encode_end(AVCodecContext *avctx) static av_cold int smc_encode_end(AVCodecContext *avctx)
{ {
SMCContext *s = avctx->priv_data; SMCContext *s = avctx->priv_data;

View File

@ -95,7 +95,7 @@ const FFCodec ff_text_decoder = {
#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER || CONFIG_STL_DECODER #if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER || CONFIG_STL_DECODER
static int linebreak_init(AVCodecContext *avctx) static av_cold int linebreak_init(AVCodecContext *avctx)
{ {
TextContext *text = avctx->priv_data; TextContext *text = avctx->priv_data;
text->linebreaks = "|"; text->linebreaks = "|";

View File

@ -74,7 +74,7 @@ static int8_t vaapi_av1_get_bit_depth_idx(AVCodecContext *avctx)
return bit_depth == 8 ? 0 : bit_depth == 10 ? 1 : 2; return bit_depth == 8 ? 0 : bit_depth == 10 ? 1 : 2;
} }
static int vaapi_av1_decode_init(AVCodecContext *avctx) static av_cold int vaapi_av1_decode_init(AVCodecContext *avctx)
{ {
VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;
@ -92,7 +92,7 @@ static int vaapi_av1_decode_init(AVCodecContext *avctx)
return ff_vaapi_decode_init(avctx); return ff_vaapi_decode_init(avctx);
} }
static int vaapi_av1_decode_uninit(AVCodecContext *avctx) static av_cold int vaapi_av1_decode_uninit(AVCodecContext *avctx)
{ {
VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;

View File

@ -139,8 +139,8 @@ int ff_vdpau_common_frame_params(AVCodecContext *avctx,
return 0; return 0;
} }
int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, av_cold int ff_vdpau_common_init(AVCodecContext *avctx,
int level) VdpDecoderProfile profile, int level)
{ {
VDPAUHWContext *hwctx = avctx->hwaccel_context; VDPAUHWContext *hwctx = avctx->hwaccel_context;
VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data; VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
@ -290,7 +290,7 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
return vdpau_error(status); return vdpau_error(status);
} }
int ff_vdpau_common_uninit(AVCodecContext *avctx) av_cold int ff_vdpau_common_uninit(AVCodecContext *avctx)
{ {
VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data; VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
VdpDecoderDestroy *destroy; VdpDecoderDestroy *destroy;

View File

@ -330,7 +330,7 @@ static int vdpau_av1_end_frame(AVCodecContext *avctx)
return 0; return 0;
} }
static int vdpau_av1_init(AVCodecContext *avctx) static av_cold int vdpau_av1_init(AVCodecContext *avctx)
{ {
VdpDecoderProfile profile; VdpDecoderProfile profile;
uint32_t level = avctx->level; uint32_t level = avctx->level;

View File

@ -214,7 +214,7 @@ static int vdpau_h264_end_frame(AVCodecContext *avctx)
return 0; return 0;
} }
static int vdpau_h264_init(AVCodecContext *avctx) static av_cold int vdpau_h264_init(AVCodecContext *avctx)
{ {
VdpDecoderProfile profile; VdpDecoderProfile profile;
uint32_t level = avctx->level; uint32_t level = avctx->level;

View File

@ -513,7 +513,7 @@ static int vdpau_hevc_parse_rext_profile(AVCodecContext *avctx, VdpDecoderProfil
} }
static int vdpau_hevc_init(AVCodecContext *avctx) static av_cold int vdpau_hevc_init(AVCodecContext *avctx)
{ {
VdpDecoderProfile profile; VdpDecoderProfile profile;
uint32_t level = avctx->level; uint32_t level = avctx->level;

View File

@ -100,7 +100,7 @@ static int vdpau_mpeg_decode_slice(AVCodecContext *avctx,
} }
#if CONFIG_MPEG1_VDPAU_HWACCEL #if CONFIG_MPEG1_VDPAU_HWACCEL
static int vdpau_mpeg1_init(AVCodecContext *avctx) static av_cold int vdpau_mpeg1_init(AVCodecContext *avctx)
{ {
return ff_vdpau_common_init(avctx, VDP_DECODER_PROFILE_MPEG1, return ff_vdpau_common_init(avctx, VDP_DECODER_PROFILE_MPEG1,
VDP_DECODER_LEVEL_MPEG1_NA); VDP_DECODER_LEVEL_MPEG1_NA);
@ -123,7 +123,7 @@ const FFHWAccel ff_mpeg1_vdpau_hwaccel = {
#endif #endif
#if CONFIG_MPEG2_VDPAU_HWACCEL #if CONFIG_MPEG2_VDPAU_HWACCEL
static int vdpau_mpeg2_init(AVCodecContext *avctx) static av_cold int vdpau_mpeg2_init(AVCodecContext *avctx)
{ {
VdpDecoderProfile profile; VdpDecoderProfile profile;

View File

@ -90,7 +90,7 @@ static int vdpau_mpeg4_decode_slice(av_unused AVCodecContext *avctx,
return 0; return 0;
} }
static int vdpau_mpeg4_init(AVCodecContext *avctx) static av_cold int vdpau_mpeg4_init(AVCodecContext *avctx)
{ {
VdpDecoderProfile profile; VdpDecoderProfile profile;

View File

@ -116,7 +116,7 @@ static int vdpau_vc1_decode_slice(AVCodecContext *avctx,
return 0; return 0;
} }
static int vdpau_vc1_init(AVCodecContext *avctx) static av_cold int vdpau_vc1_init(AVCodecContext *avctx)
{ {
VdpDecoderProfile profile; VdpDecoderProfile profile;

View File

@ -197,7 +197,7 @@ static int vdpau_vp9_end_frame(AVCodecContext *avctx)
return 0; return 0;
} }
static int vdpau_vp9_init(AVCodecContext *avctx) static av_cold int vdpau_vp9_init(AVCodecContext *avctx)
{ {
VdpDecoderProfile profile; VdpDecoderProfile profile;
uint32_t level = avctx->level; uint32_t level = avctx->level;