| 666 | } |
| 667 | |
| 668 | int 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 | |
| 692 | int ff_vaapi_decode_init(AVCodecContext *avctx) |
| 693 | { |
nothing calls this directly
no test coverage detected