mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
Revert "lavfi/vf_hwupload: switch to query_func2()"
This reverts commit 848256677d.
This commit is contained in:
parent
e26e2fecd7
commit
c1995d747c
1 changed files with 6 additions and 7 deletions
|
|
@ -66,11 +66,9 @@ static int hwupload_init(AVFilterContext *avctx)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int hwupload_query_formats(const AVFilterContext *avctx,
|
||||
AVFilterFormatsConfig **cfg_in,
|
||||
AVFilterFormatsConfig **cfg_out)
|
||||
static int hwupload_query_formats(AVFilterContext *avctx)
|
||||
{
|
||||
const HWUploadContext *ctx = avctx->priv;
|
||||
HWUploadContext *ctx = avctx->priv;
|
||||
AVHWFramesConstraints *constraints = NULL;
|
||||
const enum AVPixelFormat *input_pix_fmts, *output_pix_fmts;
|
||||
AVFilterFormats *input_formats = NULL;
|
||||
|
|
@ -98,15 +96,16 @@ static int hwupload_query_formats(const AVFilterContext *avctx,
|
|||
}
|
||||
}
|
||||
|
||||
if ((err = ff_formats_ref(input_formats, &cfg_in[0]->formats)) < 0 ||
|
||||
if ((err = ff_formats_ref(input_formats, &avctx->inputs[0]->outcfg.formats)) < 0 ||
|
||||
(err = ff_formats_ref(ff_make_format_list(output_pix_fmts),
|
||||
&cfg_out[0]->formats)) < 0)
|
||||
&avctx->outputs[0]->incfg.formats)) < 0)
|
||||
goto fail;
|
||||
|
||||
av_hwframe_constraints_free(&constraints);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
av_buffer_unref(&ctx->hwdevice_ref);
|
||||
av_hwframe_constraints_free(&constraints);
|
||||
return err;
|
||||
}
|
||||
|
|
@ -267,6 +266,6 @@ const FFFilter ff_vf_hwupload = {
|
|||
.priv_size = sizeof(HWUploadContext),
|
||||
FILTER_INPUTS(hwupload_inputs),
|
||||
FILTER_OUTPUTS(hwupload_outputs),
|
||||
FILTER_QUERY_FUNC2(hwupload_query_formats),
|
||||
FILTER_QUERY_FUNC(hwupload_query_formats),
|
||||
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue