Unified · Split
| @@ -35,14 +35,16 @@ typedef struct HWDownloadContext { · 34 unmodified lines | |||
| 35 | AVHWFramesContext *hwframes; | 35 | AVHWFramesContext *hwframes; |
| 36 | } HWDownloadContext; | 36 | } HWDownloadContext; |
| 37 | 37 | ||
| 38 | static int hwdownload_query_formats(AVFilterContext *avctx) | 38 | static 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 | }; |