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

Function ff_vaapi_common_frame_params

libavcodec/vaapi_decode.c:668–690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668int ff_vaapi_common_frame_params(AVCodecContext *avctx,
669 AVBufferRef *hw_frames_ctx)
670{
671 AVHWFramesContext *hw_frames = (AVHWFramesContext *)hw_frames_ctx->data;
672 AVHWDeviceContext *device_ctx = hw_frames->device_ctx;
673 AVVAAPIDeviceContext *hwctx;
674 VAConfigID va_config = VA_INVALID_ID;
675 int err;
676
677 if (device_ctx->type != AV_HWDEVICE_TYPE_VAAPI)
678 return AVERROR(EINVAL);
679 hwctx = device_ctx->hwctx;
680
681 err = vaapi_decode_make_config(avctx, hw_frames->device_ref, &va_config,
682 hw_frames_ctx);
683 if (err)
684 return err;
685
686 if (va_config != VA_INVALID_ID)
687 vaDestroyConfig(hwctx->display, va_config);
688
689 return 0;
690}
691
692int ff_vaapi_decode_init(AVCodecContext *avctx)
693{

Callers

nothing calls this directly

Calls 1

vaapi_decode_make_configFunction · 0.85

Tested by

no test coverage detected