History

lavfi/vf_hwdownload: switch to query_func2()

Anton Khirnov committed 2 years ago

Commit 01458a01 parent 6db82791 file · +6 −4Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_hwdownload.c+6−4
@@ -35,14 +35,16 @@ typedef struct HWDownloadContext { · 34 unmodified lines
35 AVHWFramesContext *hwframes;35 AVHWFramesContext *hwframes;
36} HWDownloadContext;36} HWDownloadContext;
37 37
38static int hwdownload_query_formats(AVFilterContext *avctx)38static int hwdownload_query_formats(const AVFilterContext *avctx,
39 AVFilterFormatsConfig **cfg_in,
40 AVFilterFormatsConfig **cfg_out)
39{41{
40 int err;42 int err;
41 43
42 if ((err = ff_formats_ref(ff_formats_pixdesc_filter(AV_PIX_FMT_FLAG_HWACCEL, 0),44 if ((err = ff_formats_ref(ff_formats_pixdesc_filter(AV_PIX_FMT_FLAG_HWACCEL, 0),
43 &avctx->inputs[0]->outcfg.formats)) ||45 &cfg_in[0]->formats)) ||
44 (err = ff_formats_ref(ff_formats_pixdesc_filter(0, AV_PIX_FMT_FLAG_HWACCEL),46 (err = ff_formats_ref(ff_formats_pixdesc_filter(0, AV_PIX_FMT_FLAG_HWACCEL),
45 &avctx->outputs[0]->incfg.formats)))47 &cfg_out[0]->formats)))
46 return err;48 return err;
47 49
48 return 0;50 return 0;
@@ -198,6 +200,6 @@ const AVFilter ff_vf_hwdownload = { · 149 unmodified lines
198 .priv_class = &hwdownload_class,200 .priv_class = &hwdownload_class,
199 FILTER_INPUTS(hwdownload_inputs),201 FILTER_INPUTS(hwdownload_inputs),
200 FILTER_OUTPUTS(hwdownload_outputs),202 FILTER_OUTPUTS(hwdownload_outputs),
201 FILTER_QUERY_FUNC(hwdownload_query_formats),203 FILTER_QUERY_FUNC2(hwdownload_query_formats),
202 .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,204 .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
203};205};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t