From 99feb59cf7ea9d6753502d76110ced96f128dac6 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 26 Sep 2021 00:09:16 +0200 Subject: avfilter/formats: Make ff_formats_pixdesc_filter return AVFilterFormats* Up until now, it has returned the AVFilterFormats list via an AVFilterFormats** parameter; the actual return value was an int that was always AVERROR(ENOMEM) on error. The AVFilterFormats** argument was a pure output parameter which was only documented by naming the parameter rfmts. Yet nevertheless all callers initialized the underlying AVFilterFormats* to NULL. This commit changes this to return a pointer to AVFilterFormats directly. This is more in line with the API in general, as it allows to avoid checks for intermediate values. Reviewed-by: Nicolas George Signed-off-by: Andreas Rheinhardt --- libavfilter/formats.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter/formats.h') diff --git a/libavfilter/formats.h b/libavfilter/formats.h index 471cb42bc4..42fe068765 100644 --- a/libavfilter/formats.h +++ b/libavfilter/formats.h @@ -230,7 +230,7 @@ AVFilterFormats *ff_all_formats(enum AVMediaType type); * properties */ av_warn_unused_result -int ff_formats_pixdesc_filter(AVFilterFormats **rfmts, unsigned want, unsigned rej); +AVFilterFormats *ff_formats_pixdesc_filter(unsigned want, unsigned rej); //* format is software, non-planar with sub-sampling #define FF_PIX_FMT_FLAG_SW_FLAT_SUB (1 << 24) -- cgit v1.2.3