History

avfilter/avfiltergraph: Remove dead checks

These checks emit warnings in case the channel layouts lists are inconsistent; yet since 69f5f6ea375950b4845b241ee27054bfc8f00343 a function that is called earlier errors out if they are inconsistent.

Andreas Rheinhardt committed 5 years ago

Commit 3969c2a1 parent 4f46c3c1 file · +1 −21Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfiltergraph.c+1−21
@@ -295,21 +295,6 @@ AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *nam · 294 unmodified lines
295 return NULL;295 return NULL;
296}296}
297 297
298static void sanitize_channel_layouts(void *log, AVFilterChannelLayouts *l)
299{
300 if (!l)
301 return;
302 if (l->nb_channel_layouts) {
303 if (l->all_layouts || l->all_counts)
304 av_log(log, AV_LOG_WARNING, "All layouts set on non-empty list\n");
305 l->all_layouts = l->all_counts = 0;
306 } else {
307 if (l->all_counts && !l->all_layouts)
308 av_log(log, AV_LOG_WARNING, "All counts without all layouts\n");
309 l->all_layouts = 1;
310 }
311}
312
313static int filter_link_check_formats(void *log, AVFilterLink *link, AVFilterFormatsConfig *cfg)298static int filter_link_check_formats(void *log, AVFilterLink *link, AVFilterFormatsConfig *cfg)
314{299{
315 int ret;300 int ret;
@@ -359,7 +344,7 @@ static int filter_check_formats(AVFilterContext *ctx) · 43 unmodified lines
359 344
360static int filter_query_formats(AVFilterContext *ctx)345static int filter_query_formats(AVFilterContext *ctx)
361{346{
362 int ret, i;347 int ret;
363 AVFilterFormats *formats;348 AVFilterFormats *formats;
364 AVFilterChannelLayouts *chlayouts;349 AVFilterChannelLayouts *chlayouts;
365 enum AVMediaType type = ctx->inputs && ctx->inputs [0] ? ctx->inputs [0]->type :350 enum AVMediaType type = ctx->inputs && ctx->inputs [0] ? ctx->inputs [0]->type :
@@ -376,11 +361,6 @@ static int filter_query_formats(AVFilterContext *ctx) · 10 unmodified lines
376 if (ret < 0)361 if (ret < 0)
377 return ret;362 return ret;
378 363
379 for (i = 0; i < ctx->nb_inputs; i++)
380 sanitize_channel_layouts(ctx, ctx->inputs[i]->outcfg.channel_layouts);
381 for (i = 0; i < ctx->nb_outputs; i++)
382 sanitize_channel_layouts(ctx, ctx->outputs[i]->incfg.channel_layouts);
383
384 formats = ff_all_formats(type);364 formats = ff_all_formats(type);
385 if ((ret = ff_set_common_formats(ctx, formats)) < 0)365 if ((ret = ff_set_common_formats(ctx, formats)) < 0)
386 return ret;366 return ret;

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