History

avfilter/vf_scale: Reindentation

Andreas Rheinhardt committed 5 years ago

Commit a228bae1 parent 04f8d791 file · +23 −22Browse files

Unified · Split

libavfilter/vf_scale.c+23−22
@@ -341,34 +341,35 @@ static av_cold void uninit(AVFilterContext *ctx) · 340 unmodified lines
341341 static int query_formats(AVFilterContext *ctx)
342342 {
343343 AVFilterFormats *formats;
344+ const AVPixFmtDescriptor *desc;
344345 enum AVPixelFormat pix_fmt;
345346 int ret;
346347
347− const AVPixFmtDescriptor *desc = NULL;
348− formats = NULL;
349− while ((desc = av_pix_fmt_desc_next(desc))) {
350− pix_fmt = av_pix_fmt_desc_get_id(desc);
351− if ((sws_isSupportedInput(pix_fmt) ||
352− sws_isSupportedEndiannessConversion(pix_fmt))
353− && (ret = ff_add_format(&formats, pix_fmt)) < 0) {
354− return ret;
355− }
356− }
357− if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0)
348+ desc = NULL;
349+ formats = NULL;
350+ while ((desc = av_pix_fmt_desc_next(desc))) {
351+ pix_fmt = av_pix_fmt_desc_get_id(desc);
352+ if ((sws_isSupportedInput(pix_fmt) ||
353+ sws_isSupportedEndiannessConversion(pix_fmt))
354+ && (ret = ff_add_format(&formats, pix_fmt)) < 0) {
358355 return ret;
359−
360− desc = NULL;
361− formats = NULL;
362− while ((desc = av_pix_fmt_desc_next(desc))) {
363− pix_fmt = av_pix_fmt_desc_get_id(desc);
364− if ((sws_isSupportedOutput(pix_fmt) || pix_fmt == AV_PIX_FMT_PAL8 ||
365− sws_isSupportedEndiannessConversion(pix_fmt))
366− && (ret = ff_add_format(&formats, pix_fmt)) < 0) {
367− return ret;
368− }
369356 }
370− if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
357+ }
358+ if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0)
359+ return ret;
360+
361+ desc = NULL;
362+ formats = NULL;
363+ while ((desc = av_pix_fmt_desc_next(desc))) {
364+ pix_fmt = av_pix_fmt_desc_get_id(desc);
365+ if ((sws_isSupportedOutput(pix_fmt) || pix_fmt == AV_PIX_FMT_PAL8 ||
366+ sws_isSupportedEndiannessConversion(pix_fmt))
367+ && (ret = ff_add_format(&formats, pix_fmt)) < 0) {
371368 return ret;
369+ }
370+ }
371+ if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
372+ return ret;
372373
373374 return 0;
374375 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t