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

Function ff_vaapi_decode_uninit

libavcodec/vaapi_decode.c:738–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736}
737
738int ff_vaapi_decode_uninit(AVCodecContext *avctx)
739{
740 VAAPIDecodeContext *ctx = avctx->internal->hwaccel_priv_data;
741 VAStatus vas;
742
743 if (ctx->va_context != VA_INVALID_ID) {
744 vas = vaDestroyContext(ctx->hwctx->display, ctx->va_context);
745 if (vas != VA_STATUS_SUCCESS) {
746 av_log(avctx, AV_LOG_ERROR, "Failed to destroy decode "
747 "context %#x: %d (%s).\n",
748 ctx->va_context, vas, vaErrorStr(vas));
749 }
750 }
751 if (ctx->va_config != VA_INVALID_ID) {
752 vas = vaDestroyConfig(ctx->hwctx->display, ctx->va_config);
753 if (vas != VA_STATUS_SUCCESS) {
754 av_log(avctx, AV_LOG_ERROR, "Failed to destroy decode "
755 "configuration %#x: %d (%s).\n",
756 ctx->va_config, vas, vaErrorStr(vas));
757 }
758 }
759
760 return 0;
761}

Callers 2

vaapi_av1_decode_uninitFunction · 0.85
ff_vaapi_decode_initFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected