summaryrefslogtreecommitdiff
path: root/libavfilter/vf_hflip.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_hflip.c')
-rw-r--r--libavfilter/vf_hflip.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 362bd013a9..96ffca880b 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -44,15 +44,16 @@ typedef struct FlipContext {
static int query_formats(AVFilterContext *ctx)
{
AVFilterFormats *pix_fmts = NULL;
- int fmt;
+ int fmt, ret;
for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
desc->flags & AV_PIX_FMT_FLAG_BITSTREAM ||
(desc->log2_chroma_w != desc->log2_chroma_h &&
- desc->comp[0].plane == desc->comp[1].plane)))
- ff_add_format(&pix_fmts, fmt);
+ desc->comp[0].plane == desc->comp[1].plane)) &&
+ (ret = ff_add_format(&pix_fmts, fmt)) < 0)
+ return ret;
}
return ff_set_common_formats(ctx, pix_fmts);