Unified · Split
| @@ -37,14 +37,16 @@ typedef struct HWMapContext { · 36 unmodified lines | |||
| 37 | int reverse; | 37 | int reverse; |
| 38 | } HWMapContext; | 38 | } HWMapContext; |
| 39 | 39 | ||
| 40 | static int hwmap_query_formats(AVFilterContext *avctx) | 40 | static int hwmap_query_formats(const AVFilterContext *avctx, |
| 41 | AVFilterFormatsConfig **cfg_in, | ||
| 42 | AVFilterFormatsConfig **cfg_out) | ||
| 41 | { | 43 | { |
| 42 | int ret; | 44 | int ret; |
| 43 | 45 | ||
| 44 | if ((ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO), | 46 | if ((ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO), |
| 45 | &avctx->inputs[0]->outcfg.formats)) < 0 || | 47 | &cfg_in[0]->formats)) < 0 || |
| 46 | (ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO), | 48 | (ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO), |
| 47 | &avctx->outputs[0]->incfg.formats)) < 0) | 49 | &cfg_out[0]->formats)) < 0) |
| 48 | return ret; | 50 | return ret; |
| 49 | 51 | ||
| 50 | return 0; | 52 | return 0; |
| @@ -428,7 +430,7 @@ const AVFilter ff_vf_hwmap = { · 377 unmodified lines | |||
| 428 | .priv_class = &hwmap_class, | 430 | .priv_class = &hwmap_class, |
| 429 | FILTER_INPUTS(hwmap_inputs), | 431 | FILTER_INPUTS(hwmap_inputs), |
| 430 | FILTER_OUTPUTS(hwmap_outputs), | 432 | FILTER_OUTPUTS(hwmap_outputs), |
| 431 | FILTER_QUERY_FUNC(hwmap_query_formats), | 433 | FILTER_QUERY_FUNC2(hwmap_query_formats), |
| 432 | .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, | 434 | .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, |
| 433 | .flags = AVFILTER_FLAG_HWDEVICE, | 435 | .flags = AVFILTER_FLAG_HWDEVICE, |
| 434 | }; | 436 | }; |