diff options
Diffstat (limited to 'libavfilter/vf_stack.c')
-rw-r--r-- | libavfilter/vf_stack.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c index 8a90caada7..c4bbd6166d 100644 --- a/libavfilter/vf_stack.c +++ b/libavfilter/vf_stack.c @@ -43,14 +43,15 @@ typedef struct StackContext { 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_PAL || desc->flags & AV_PIX_FMT_FLAG_HWACCEL || - 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); |