summaryrefslogtreecommitdiff
path: root/libavfilter/formats.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-26 00:09:16 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-26 12:41:33 +0200
commit99feb59cf7ea9d6753502d76110ced96f128dac6 (patch)
treee0f823719df3fbb9db44e7c421bf84d894210320 /libavfilter/formats.h
parentaff855148a098c70c0a55c58aeb1205d839ed516 (diff)
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 <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/formats.h')
-rw-r--r--libavfilter/formats.h2
1 files changed, 1 insertions, 1 deletions
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)