summaryrefslogtreecommitdiff
path: root/libavfilter/vf_stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_stack.c')
-rw-r--r--libavfilter/vf_stack.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c
index 3afcdfda87..338154e715 100644
--- a/libavfilter/vf_stack.c
+++ b/libavfilter/vf_stack.c
@@ -60,21 +60,16 @@ typedef struct StackContext {
static int query_formats(AVFilterContext *ctx)
{
- AVFilterFormats *formats = NULL;
StackContext *s = ctx->priv;
- int ret;
+ int reject_flags = AV_PIX_FMT_FLAG_BITSTREAM |
+ AV_PIX_FMT_FLAG_HWACCEL |
+ AV_PIX_FMT_FLAG_PAL;
if (s->fillcolor_enable) {
return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0));
}
- ret = ff_formats_pixdesc_filter(&formats, 0,
- AV_PIX_FMT_FLAG_HWACCEL |
- AV_PIX_FMT_FLAG_BITSTREAM |
- AV_PIX_FMT_FLAG_PAL);
- if (ret < 0)
- return ret;
- return ff_set_common_formats(ctx, formats);
+ return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, reject_flags));
}
static av_cold int init(AVFilterContext *ctx)