summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fieldorder.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_fieldorder.c')
-rw-r--r--libavfilter/vf_fieldorder.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index 85b6688fb3..52b4b3d8aa 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -40,24 +40,23 @@ typedef struct FieldOrderContext {
static int query_formats(AVFilterContext *ctx)
{
+ const AVPixFmtDescriptor *desc = NULL;
AVFilterFormats *formats;
- enum AVPixelFormat pix_fmt;
int ret;
/** accept any input pixel format that is not hardware accelerated, not
* a bitstream format, and does not have vertically sub-sampled chroma */
- const AVPixFmtDescriptor *desc = NULL;
- formats = NULL;
- while ((desc = av_pix_fmt_desc_next(desc))) {
- pix_fmt = av_pix_fmt_desc_get_id(desc);
- if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
- desc->flags & AV_PIX_FMT_FLAG_PAL ||
- desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&
- desc->nb_components && !desc->log2_chroma_h &&
- (ret = ff_add_format(&formats, pix_fmt)) < 0)
- return ret;
- }
- return ff_set_common_formats(ctx, formats);
+ formats = NULL;
+ while ((desc = av_pix_fmt_desc_next(desc))) {
+ enum AVPixelFormat pix_fmt = av_pix_fmt_desc_get_id(desc);
+ if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
+ desc->flags & AV_PIX_FMT_FLAG_PAL ||
+ desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&
+ desc->nb_components && !desc->log2_chroma_h &&
+ (ret = ff_add_format(&formats, pix_fmt)) < 0)
+ return ret;
+ }
+ return ff_set_common_formats(ctx, formats);
}
static int config_input(AVFilterLink *inlink)