mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-21 06:20:09 +01:00
vaapi_encode: Remove common priv_data and options fields
The codec-specific context now contains both the common context and the codec-specific options directly.
This commit is contained in:
@@ -1372,17 +1372,9 @@ av_cold int ff_vaapi_encode_init(AVCodecContext *avctx)
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
ctx->codec_options = ctx->codec_options_data;
|
||||
|
||||
ctx->va_config = VA_INVALID_ID;
|
||||
ctx->va_context = VA_INVALID_ID;
|
||||
|
||||
ctx->priv_data = av_mallocz(ctx->codec->priv_data_size);
|
||||
if (!ctx->priv_data) {
|
||||
err = AVERROR(ENOMEM);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ctx->input_frames_ref = av_buffer_ref(avctx->hw_frames_ctx);
|
||||
if (!ctx->input_frames_ref) {
|
||||
err = AVERROR(ENOMEM);
|
||||
@@ -1583,7 +1575,5 @@ av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
|
||||
av_buffer_unref(&ctx->input_frames_ref);
|
||||
av_buffer_unref(&ctx->device_ref);
|
||||
|
||||
av_freep(&ctx->priv_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user