| 75 | } |
| 76 | |
| 77 | static av_cold int vaapi_av1_decode_init(AVCodecContext *avctx) |
| 78 | { |
| 79 | VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; |
| 80 | |
| 81 | ctx->tmp_frame = av_frame_alloc(); |
| 82 | if (!ctx->tmp_frame) |
| 83 | return AVERROR(ENOMEM); |
| 84 | |
| 85 | for (int i = 0; i < FF_ARRAY_ELEMS(ctx->ref_tab); i++) { |
| 86 | ctx->ref_tab[i].frame = av_frame_alloc(); |
| 87 | if (!ctx->ref_tab[i].frame) |
| 88 | return AVERROR(ENOMEM); |
| 89 | ctx->ref_tab[i].valid = 0; |
| 90 | } |
| 91 | |
| 92 | return ff_vaapi_decode_init(avctx); |
| 93 | } |
| 94 | |
| 95 | static av_cold int vaapi_av1_decode_uninit(AVCodecContext *avctx) |
| 96 | { |
nothing calls this directly
no test coverage detected