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

Unified · Split

libavfilter/avfiltergraph.c+1−21
@@ -295,21 +295,6 @@ AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *nam · 294 unmodified lines
295295 return NULL;
296296 }
297297
298−static 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−
313298 static int filter_link_check_formats(void *log, AVFilterLink *link, AVFilterFormatsConfig *cfg)
314299 {
315300 int ret;
@@ -359,7 +344,7 @@ static int filter_check_formats(AVFilterContext *ctx) · 43 unmodified lines
359344
360345 static int filter_query_formats(AVFilterContext *ctx)
361346 {
362− int ret, i;
347+ int ret;
363348 AVFilterFormats *formats;
364349 AVFilterChannelLayouts *chlayouts;
365350 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
376361 if (ret < 0)
377362 return ret;
378363
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−
384364 formats = ff_all_formats(type);
385365 if ((ret = ff_set_common_formats(ctx, formats)) < 0)
386366 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