Commit 494b7924 authored by Paul B Mahol's avatar Paul B Mahol

avfilter: use ff_all_channel_counts() instead of ff_all_channel_layouts()

Fixes playback of some files with ffplay.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent e3e55758
...@@ -66,7 +66,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -66,7 +66,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -160,7 +160,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -160,7 +160,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -70,7 +70,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -70,7 +70,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -96,7 +96,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -96,7 +96,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -74,7 +74,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -74,7 +74,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -144,7 +144,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -144,7 +144,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -162,7 +162,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -162,7 +162,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -109,7 +109,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -109,7 +109,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -61,7 +61,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -61,7 +61,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -113,7 +113,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -113,7 +113,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -97,7 +97,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -97,7 +97,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -612,7 +612,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -612,7 +612,7 @@ static int query_formats(AVFilterContext *ctx)
if (s->nb_inputs == 1 && s->nb_outputs == 1) { if (s->nb_inputs == 1 && s->nb_outputs == 1) {
// We will instantiate multiple LADSPA_Handle, one over each channel // We will instantiate multiple LADSPA_Handle, one over each channel
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
......
...@@ -257,7 +257,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -257,7 +257,7 @@ static int query_formats(AVFilterContext *ctx)
ff_channel_layouts_ref(layouts, &ctx->outputs[0]->in_channel_layouts); ff_channel_layouts_ref(layouts, &ctx->outputs[0]->in_channel_layouts);
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ff_channel_layouts_ref(layouts, &ctx->inputs[i]->out_channel_layouts); ff_channel_layouts_ref(layouts, &ctx->inputs[i]->out_channel_layouts);
......
...@@ -420,7 +420,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -420,7 +420,7 @@ static int query_formats(AVFilterContext *ctx)
}; };
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
...@@ -154,7 +154,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -154,7 +154,7 @@ static int query_formats(AVFilterContext *ctx)
AVFilterChannelLayouts *layouts; AVFilterChannelLayouts *layouts;
int ret; int ret;
layouts = ff_all_channel_layouts(); layouts = ff_all_channel_counts();
if (!layouts) if (!layouts)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts); ret = ff_set_common_channel_layouts(ctx, layouts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment