MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / vaapi_encode_free

Function vaapi_encode_free

libavcodec/vaapi_encode.c:854–876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

852}
853
854static int vaapi_encode_free(AVCodecContext *avctx, FFHWBaseEncodePicture *pic)
855{
856 VAAPIEncodePicture *priv = pic->priv;
857 int i;
858
859 if (pic->encode_issued)
860 vaapi_encode_discard(avctx, pic);
861
862 if (priv->slices) {
863 for (i = 0; i < priv->nb_slices; i++)
864 av_freep(&priv->slices[i].codec_slice_params);
865 }
866
867 av_freep(&priv->param_buffers);
868 av_freep(&priv->slices);
869 // Output buffer should already be destroyed.
870 av_assert0(priv->output_buffer == VA_INVALID_ID);
871
872 av_freep(&priv->codec_picture_params);
873 av_freep(&priv->roi);
874
875 return 0;
876}
877
878static av_cold void vaapi_encode_add_global_param(AVCodecContext *avctx, int type,
879 void *buffer, size_t size)

Callers 1

ff_vaapi_encode_closeFunction · 0.85

Calls 2

vaapi_encode_discardFunction · 0.85
av_freepFunction · 0.85

Tested by

no test coverage detected