summaryrefslogtreecommitdiff
path: root/libavfilter/vf_detelecine.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_detelecine.c')
-rw-r--r--libavfilter/vf_detelecine.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/vf_detelecine.c b/libavfilter/vf_detelecine.c
index 320e90d052..9af2a133ac 100644
--- a/libavfilter/vf_detelecine.c
+++ b/libavfilter/vf_detelecine.c
@@ -116,14 +116,15 @@ static av_cold int init(AVFilterContext *ctx)
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_PAL ||
- desc->flags & AV_PIX_FMT_FLAG_BITSTREAM))
- ff_add_format(&pix_fmts, fmt);
+ desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&
+ (ret = ff_add_format(&pix_fmts, fmt)) < 0)
+ return ret;
}
return ff_set_common_formats(ctx, pix_fmts);