aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-01-20 12:26:08 -0300
committerJames Almer <jamrial@gmail.com>2024-03-07 08:53:30 -0300
commit65ddc74988245a01421a63c5cffa4d900c47117c (patch)
tree72bd32783aca75dff15c038cd0a69d724514b31c /libavfilter
parenta12cd3be98e8aba6e74274192ec6532988aa9444 (diff)
downloadffmpeg-65ddc74988245a01421a63c5cffa4d900c47117c.tar.gz
avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUT
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_afir.c5
-rw-r--r--libavfilter/af_aformat.c13
-rw-r--r--libavfilter/af_amerge.c6
-rw-r--r--libavfilter/af_aresample.c6
-rw-r--r--libavfilter/af_ashowinfo.c10
-rw-r--r--libavfilter/af_channelmap.c6
-rw-r--r--libavfilter/af_channelsplit.c7
-rw-r--r--libavfilter/af_join.c6
-rw-r--r--libavfilter/af_ladspa.c5
-rw-r--r--libavfilter/af_lv2.c5
-rw-r--r--libavfilter/af_pan.c6
-rw-r--r--libavfilter/audio.c12
-rw-r--r--libavfilter/avfilter.h8
-rw-r--r--libavfilter/avfiltergraph.c6
-rw-r--r--libavfilter/buffersink.c70
-rw-r--r--libavfilter/buffersink.h4
-rw-r--r--libavfilter/buffersrc.c44
-rw-r--r--libavfilter/buffersrc.h9
-rw-r--r--libavfilter/f_streamselect.c5
-rw-r--r--libavfilter/formats.c20
-rw-r--r--libavfilter/framepool.c5
-rw-r--r--libavfilter/tests/formats.c3
22 files changed, 5 insertions, 256 deletions
diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
index ce5a61dfe0..6e54a7239d 100644
--- a/libavfilter/af_afir.c
+++ b/libavfilter/af_afir.c
@@ -508,11 +508,6 @@ static int config_output(AVFilterLink *outlink)
s->one2many = ctx->inputs[1 + s->selir]->ch_layout.nb_channels == 1;
outlink->sample_rate = ctx->inputs[0]->sample_rate;
outlink->time_base = ctx->inputs[0]->time_base;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- outlink->channel_layout = ctx->inputs[0]->channel_layout;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if ((ret = av_channel_layout_copy(&outlink->ch_layout, &ctx->inputs[0]->ch_layout)) < 0)
return ret;
outlink->ch_layout.nb_channels = ctx->inputs[0]->ch_layout.nb_channels;
diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c
index 367a02df33..8a3bdee7f8 100644
--- a/libavfilter/af_aformat.c
+++ b/libavfilter/af_aformat.c
@@ -103,21 +103,8 @@ static int parse_channel_layouts(AVFilterContext *ctx)
ret = av_channel_layout_from_string(&fmt, cur);
if (ret < 0) {
-#if FF_API_OLD_CHANNEL_LAYOUT
- uint64_t mask;
-FF_DISABLE_DEPRECATION_WARNINGS
- mask = av_get_channel_layout(cur);
- if (!mask) {
-#endif
av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout: %s.\n", cur);
return AVERROR(EINVAL);
-#if FF_API_OLD_CHANNEL_LAYOUT
- }
-FF_ENABLE_DEPRECATION_WARNINGS
- av_log(ctx, AV_LOG_WARNING, "Channel layout '%s' uses a deprecated syntax.\n",
- cur);
- av_channel_layout_from_mask(&fmt, mask);
-#endif
}
ret = ff_add_channel_layout(&s->channel_layouts, &fmt);
av_channel_layout_uninit(&fmt);
diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
index eabd3f8262..5daf639e74 100644
--- a/libavfilter/af_amerge.c
+++ b/libavfilter/af_amerge.c
@@ -247,12 +247,6 @@ static int try_push_frame(AVFilterContext *ctx, int nb_samples)
if ((ret = av_channel_layout_copy(&outbuf->ch_layout, &outlink->ch_layout)) < 0)
return ret;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- outbuf->channel_layout = outlink->channel_layout;
- outbuf->channels = outlink->ch_layout.nb_channels;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
while (nb_samples) {
/* Unroll the most common sample formats: speed +~350% for the loop,
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index f4bcc45616..d6bd77beb3 100644
--- a/libavfilter/af_aresample.c
+++ b/libavfilter/af_aresample.c
@@ -194,12 +194,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamplesref)
av_frame_copy_props(outsamplesref, insamplesref);
outsamplesref->format = outlink->format;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- outsamplesref->channels = outlink->ch_layout.nb_channels;
- outsamplesref->channel_layout = outlink->channel_layout;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
ret = av_channel_layout_copy(&outsamplesref->ch_layout, &outlink->ch_layout);
if (ret < 0)
return ret;
diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c
index 17a0a90542..b1b462d68f 100644
--- a/libavfilter/af_ashowinfo.c
+++ b/libavfilter/af_ashowinfo.c
@@ -178,9 +178,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
{
AVFilterContext *ctx = inlink->dst;
AShowInfoContext *s = ctx->priv;
-#if FF_API_OLD_CHANNEL_LAYOUT
- AVChannelLayout layout = { 0 };
-#endif
char chlayout_str[128];
uint32_t checksum = 0;
int channels = inlink->ch_layout.nb_channels;
@@ -203,13 +200,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
s->plane_checksums[0];
}
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (av_channel_layout_from_mask(&layout, buf->channel_layout)) {
- av_channel_layout_describe(&layout, chlayout_str, sizeof(chlayout_str));
-FF_ENABLE_DEPRECATION_WARNINGS
- } else if (buf->ch_layout.nb_channels)
-#endif
av_channel_layout_describe(&buf->ch_layout, chlayout_str, sizeof(chlayout_str));
av_log(ctx, AV_LOG_INFO,
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index 69718f5b4a..5e1cf57680 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -324,12 +324,6 @@ static int channelmap_filter_frame(AVFilterLink *inlink, AVFrame *buf)
memcpy(buf->data, buf->extended_data,
FFMIN(FF_ARRAY_ELEMS(buf->data), nch_out) * sizeof(buf->data[0]));
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- buf->channels = outlink->ch_layout.nb_channels;
- buf->channel_layout = outlink->channel_layout;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if ((ret = av_channel_layout_copy(&buf->ch_layout, &outlink->ch_layout)) < 0)
return ret;
diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
index 932b51d701..f026c74494 100644
--- a/libavfilter/af_channelsplit.c
+++ b/libavfilter/af_channelsplit.c
@@ -164,13 +164,6 @@ static int filter_frame(AVFilterLink *outlink, AVFrame *buf)
ret = av_channel_layout_from_mask(&buf_out->ch_layout, 1ULL << channel);
if (ret < 0)
return ret;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- buf_out->channel_layout =
- av_channel_layout_extract_channel(buf->channel_layout, s->map[i]);
- buf_out->channels = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
return ff_filter_frame(ctx->outputs[i], buf_out);
}
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index 416cfd7a9a..8dab3f0931 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -504,12 +504,6 @@ static int try_push_frame(AVFilterContext *ctx)
av_make_q(1, outlink->sample_rate),
outlink->time_base);
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->channel_layout = outlink->channel_layout;
- frame->channels = outlink->ch_layout.nb_channels;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if ((ret = av_channel_layout_copy(&frame->ch_layout, &outlink->ch_layout)) < 0)
goto fail;
frame->sample_rate = outlink->sample_rate;
diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index 85e215850d..7567c0577d 100644
--- a/libavfilter/af_ladspa.c
+++ b/libavfilter/af_ladspa.c
@@ -402,11 +402,6 @@ static int config_output(AVFilterLink *outlink)
if (s->nb_inputs == s->nb_outputs) {
if ((ret = av_channel_layout_copy(&outlink->ch_layout, &inlink->ch_layout)) < 0)
return ret;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- outlink->channel_layout = inlink->channel_layout;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
ret = 0;
diff --git a/libavfilter/af_lv2.c b/libavfilter/af_lv2.c
index e577b1624d..7b3ddf9448 100644
--- a/libavfilter/af_lv2.c
+++ b/libavfilter/af_lv2.c
@@ -292,11 +292,6 @@ static int config_output(AVFilterLink *outlink)
int ret;
if ((ret = av_channel_layout_copy(&outlink->ch_layout, &inlink->ch_layout)) < 0)
return ret;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- outlink->channel_layout = inlink->channel_layout;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
} else {
diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index d8431a51d9..34073203d2 100644
--- a/libavfilter/af_pan.c
+++ b/libavfilter/af_pan.c
@@ -379,12 +379,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
swr_convert(pan->swr, outsamples->extended_data, n,
(void *)insamples->extended_data, n);
av_frame_copy_props(outsamples, insamples);
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- outsamples->channel_layout = outlink->channel_layout;
- outsamples->channels = outlink->ch_layout.nb_channels;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if ((ret = av_channel_layout_copy(&outsamples->ch_layout, &outlink->ch_layout)) < 0) {
av_frame_free(&outsamples);
av_frame_free(&insamples);
diff --git a/libavfilter/audio.c b/libavfilter/audio.c
index 652b7ff3b8..22f64d1733 100644
--- a/libavfilter/audio.c
+++ b/libavfilter/audio.c
@@ -48,13 +48,6 @@ AVFrame *ff_default_get_audio_buffer(AVFilterLink *link, int nb_samples)
FilterLinkInternal *const li = ff_link_internal(link);
int channels = link->ch_layout.nb_channels;
int align = av_cpu_max_align();
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- int channel_layout_nb_channels = av_get_channel_layout_nb_channels(link->channel_layout);
-
- av_assert0(channels == channel_layout_nb_channels || !channel_layout_nb_channels);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (!li->frame_pool) {
li->frame_pool = ff_frame_pool_audio_init(av_buffer_allocz, channels,
@@ -89,11 +82,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
return NULL;
frame->nb_samples = nb_samples;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->channel_layout = link->channel_layout;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (link->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC &&
av_channel_layout_copy(&frame->ch_layout, &link->ch_layout) < 0) {
av_frame_free(&frame);
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 5eff35b836..cf759c45c3 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -560,14 +560,6 @@ struct AVFilterLink {
int h; ///< agreed upon image height
AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
/* These parameters apply only to audio */
-#if FF_API_OLD_CHANNEL_LAYOUT
- /**
- * channel layout of current buffer (see libavutil/channel_layout.h)
- * @deprecated use ch_layout
- */
- attribute_deprecated
- uint64_t channel_layout;
-#endif
int sample_rate; ///< samples per second
int format; ///< agreed upon media format
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 674711ec35..1fb2fe2516 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -733,12 +733,6 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref)
ret = av_channel_layout_copy(&link->ch_layout, &link->incfg.channel_layouts->channel_layouts[0]);
if (ret < 0)
return ret;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- link->channel_layout = link->ch_layout.order == AV_CHANNEL_ORDER_NATIVE ?
- link->ch_layout.u.mask : 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
ff_formats_unref(&link->incfg.formats);
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 6665eddee7..e05bd0a573 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -55,12 +55,6 @@ typedef struct BufferSinkContext {
/* only used for audio */
enum AVSampleFormat *sample_fmts; ///< list of accepted sample formats
int sample_fmts_size;
-#if FF_API_OLD_CHANNEL_LAYOUT
- int64_t *channel_layouts; ///< list of accepted channel layouts
- int channel_layouts_size;
- int *channel_counts; ///< list of accepted channel counts
- int channel_counts_size;
-#endif
char *channel_layouts_str; ///< list of accepted channel layouts
int all_channel_counts;
int *sample_rates; ///< list of accepted sample rates
@@ -71,31 +65,6 @@ typedef struct BufferSinkContext {
#define NB_ITEMS(list) (list ## _size / sizeof(*list))
-#if FF_API_OLD_CHANNEL_LAYOUT
-static void cleanup_redundant_layouts(AVFilterContext *ctx)
-{
- BufferSinkContext *buf = ctx->priv;
- int nb_layouts = NB_ITEMS(buf->channel_layouts);
- int nb_counts = NB_ITEMS(buf->channel_counts);
- uint64_t counts = 0;
- int i, lc, n;
-
- for (i = 0; i < nb_counts; i++)
- if (buf->channel_counts[i] < 64)
- counts |= (uint64_t)1 << buf->channel_counts[i];
- for (i = lc = 0; i < nb_layouts; i++) {
- n = av_popcount64(buf->channel_layouts[i]);
- if (n < 64 && (counts & ((uint64_t)1 << n)))
- av_log(ctx, AV_LOG_WARNING,
- "Removing channel layout 0x%"PRIx64", redundant with %d channels\n",
- buf->channel_layouts[i], n);
- else
- buf->channel_layouts[lc++] = buf->channel_layouts[i];
- }
- buf->channel_layouts_size = lc * sizeof(*buf->channel_layouts);
-}
-#endif
-
int attribute_align_arg av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame)
{
return av_buffersink_get_frame_flags(ctx, frame, 0);
@@ -216,11 +185,6 @@ MAKE_AVFILTERLINK_ACCESSOR(AVRational , sample_aspect_ratio)
MAKE_AVFILTERLINK_ACCESSOR(enum AVColorSpace, colorspace)
MAKE_AVFILTERLINK_ACCESSOR(enum AVColorRange, color_range)
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
-MAKE_AVFILTERLINK_ACCESSOR(uint64_t , channel_layout )
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
MAKE_AVFILTERLINK_ACCESSOR(int , sample_rate )
MAKE_AVFILTERLINK_ACCESSOR(AVBufferRef * , hw_frames_ctx )
@@ -301,10 +265,6 @@ static int asink_query_formats(AVFilterContext *ctx)
CHECK_LIST_SIZE(sample_fmts)
CHECK_LIST_SIZE(sample_rates)
-#if FF_API_OLD_CHANNEL_LAYOUT
- CHECK_LIST_SIZE(channel_layouts)
- CHECK_LIST_SIZE(channel_counts)
-#endif
if (buf->sample_fmts_size) {
for (i = 0; i < NB_ITEMS(buf->sample_fmts); i++)
@@ -314,32 +274,10 @@ static int asink_query_formats(AVFilterContext *ctx)
return ret;
}
- if (
-#if FF_API_OLD_CHANNEL_LAYOUT
- buf->channel_layouts_size || buf->channel_counts_size ||
-#endif
- buf->channel_layouts_str || buf->all_channel_counts) {
-#if FF_API_OLD_CHANNEL_LAYOUT
- cleanup_redundant_layouts(ctx);
- for (i = 0; i < NB_ITEMS(buf->channel_layouts); i++)
- if ((ret = av_channel_layout_from_mask(&layout, buf->channel_layouts[i])) < 0 ||
- (ret = ff_add_channel_layout(&layouts, &layout)) < 0)
- return ret;
- for (i = 0; i < NB_ITEMS(buf->channel_counts); i++) {
- layout = FF_COUNT2LAYOUT(buf->channel_counts[i]);
- if ((ret = ff_add_channel_layout(&layouts, &layout)) < 0)
- return ret;
- }
-#endif
+ if (buf->channel_layouts_str || buf->all_channel_counts) {
if (buf->channel_layouts_str) {
const char *cur = buf->channel_layouts_str;
-#if FF_API_OLD_CHANNEL_LAYOUT
- if (layouts)
- av_log(ctx, AV_LOG_WARNING,
- "Conflicting ch_layouts and list of channel_counts/channel_layouts. Ignoring the former\n");
- else
-#endif
while (cur) {
char *next = strchr(cur, '|');
if (next)
@@ -395,12 +333,6 @@ static const AVOption buffersink_options[] = {
static const AVOption abuffersink_options[] = {
{ "sample_fmts", "set the supported sample formats", OFFSET(sample_fmts), AV_OPT_TYPE_BINARY, .flags = FLAGS },
{ "sample_rates", "set the supported sample rates", OFFSET(sample_rates), AV_OPT_TYPE_BINARY, .flags = FLAGS },
-#if FF_API_OLD_CHANNEL_LAYOUT
- { "channel_layouts", "set the supported channel layouts (deprecated, use ch_layouts)",
- OFFSET(channel_layouts), AV_OPT_TYPE_BINARY, .flags = FLAGS | AV_OPT_FLAG_DEPRECATED },
- { "channel_counts", "set the supported channel counts (deprecated, use ch_layouts)",
- OFFSET(channel_counts), AV_OPT_TYPE_BINARY, .flags = FLAGS | AV_OPT_FLAG_DEPRECATED },
-#endif
{ "ch_layouts", "set a '|'-separated list of supported channel layouts",
OFFSET(channel_layouts_str), AV_OPT_TYPE_STRING, .flags = FLAGS },
{ "all_channel_counts", "accept all channel counts", OFFSET(all_channel_counts), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h
index 5f7172028d..361d603679 100644
--- a/libavfilter/buffersink.h
+++ b/libavfilter/buffersink.h
@@ -123,10 +123,6 @@ enum AVColorSpace av_buffersink_get_colorspace (const AVFilterContext *c
enum AVColorRange av_buffersink_get_color_range (const AVFilterContext *ctx);
int av_buffersink_get_channels (const AVFilterContext *ctx);
-#if FF_API_OLD_CHANNEL_LAYOUT
-attribute_deprecated
-uint64_t av_buffersink_get_channel_layout (const AVFilterContext *ctx);
-#endif
int av_buffersink_get_ch_layout (const AVFilterContext *ctx,
AVChannelLayout *ch_layout);
int av_buffersink_get_sample_rate (const AVFilterContext *ctx);
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 5a4eabc716..98fa8b9dc8 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -152,16 +152,6 @@ int av_buffersrc_parameters_set(AVFilterContext *ctx, AVBufferSrcParameters *par
}
if (param->sample_rate > 0)
s->sample_rate = param->sample_rate;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- // if the old/new fields are set inconsistently, prefer the old ones
- if (param->channel_layout && (param->ch_layout.order != AV_CHANNEL_ORDER_NATIVE ||
- param->ch_layout.u.mask != param->channel_layout)) {
- av_channel_layout_uninit(&s->ch_layout);
- av_channel_layout_from_mask(&s->ch_layout, param->channel_layout);
-FF_ENABLE_DEPRECATION_WARNINGS
- } else
-#endif
if (param->ch_layout.nb_channels) {
int ret = av_channel_layout_copy(&s->ch_layout, &param->ch_layout);
if (ret < 0)
@@ -206,16 +196,6 @@ int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFra
AVFrame *copy;
int refcounted, ret;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (frame && frame->channel_layout &&
- av_get_channel_layout_nb_channels(frame->channel_layout) != frame->channels) {
- av_log(ctx, AV_LOG_ERROR, "Layout indicates a different number of channels than actually present\n");
- return AVERROR(EINVAL);
- }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
s->nb_failed_requests = 0;
if (!frame)
@@ -237,13 +217,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
break;
case AVMEDIA_TYPE_AUDIO:
/* For layouts unknown on input but known on link after negotiation. */
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (!frame->channel_layout)
- frame->channel_layout = s->ch_layout.order == AV_CHANNEL_ORDER_NATIVE ?
- s->ch_layout.u.mask : 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (frame->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) {
ret = av_channel_layout_copy(&frame->ch_layout, &s->ch_layout);
if (ret < 0)
@@ -419,22 +392,9 @@ static av_cold int init_audio(AVFilterContext *ctx)
if (!s->ch_layout.nb_channels) {
ret = av_channel_layout_from_string(&s->ch_layout, s->channel_layout_str);
if (ret < 0) {
-#if FF_API_OLD_CHANNEL_LAYOUT
- uint64_t mask;
-FF_DISABLE_DEPRECATION_WARNINGS
- mask = av_get_channel_layout(s->channel_layout_str);
- if (!mask) {
-#endif
- av_log(ctx, AV_LOG_ERROR, "Invalid channel layout %s.\n",
- s->channel_layout_str);
- return AVERROR(EINVAL);
-#if FF_API_OLD_CHANNEL_LAYOUT
- }
-FF_ENABLE_DEPRECATION_WARNINGS
- av_log(ctx, AV_LOG_WARNING, "Channel layout '%s' uses a deprecated syntax.\n",
+ av_log(ctx, AV_LOG_ERROR, "Invalid channel layout %s.\n",
s->channel_layout_str);
- av_channel_layout_from_mask(&s->ch_layout, mask);
-#endif
+ return AVERROR(EINVAL);
}
}
diff --git a/libavfilter/buffersrc.h b/libavfilter/buffersrc.h
index 1e29f0340e..6f3344f445 100644
--- a/libavfilter/buffersrc.h
+++ b/libavfilter/buffersrc.h
@@ -110,15 +110,6 @@ typedef struct AVBufferSrcParameters {
*/
int sample_rate;
-#if FF_API_OLD_CHANNEL_LAYOUT
- /**
- * Audio only, the audio channel layout
- * @deprecated use ch_layout
- */
- attribute_deprecated
- uint64_t channel_layout;
-#endif
-
/**
* Audio only, the audio channel layout
*/
diff --git a/libavfilter/f_streamselect.c b/libavfilter/f_streamselect.c
index 1328a842f9..c64b33a563 100644
--- a/libavfilter/f_streamselect.c
+++ b/libavfilter/f_streamselect.c
@@ -119,11 +119,6 @@ static int config_output(AVFilterLink *outlink)
case AVMEDIA_TYPE_AUDIO:
outlink->sample_rate = inlink->sample_rate;
outlink->ch_layout.nb_channels = inlink->ch_layout.nb_channels;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- outlink->channel_layout = inlink->channel_layout;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
break;
}
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 681f0b1203..d3f4c7f09c 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -972,24 +972,8 @@ int ff_parse_channel_layout(AVChannelLayout *ret, int *nret, const char *arg,
res = av_channel_layout_from_string(&chlayout, arg);
if (res < 0) {
-#if FF_API_OLD_CHANNEL_LAYOUT
- int64_t mask;
- int nb_channels;
-FF_DISABLE_DEPRECATION_WARNINGS
- if (av_get_extended_channel_layout(arg, &mask, &nb_channels) < 0) {
-#endif
- av_log(log_ctx, AV_LOG_ERROR, "Invalid channel layout '%s'\n", arg);
- return AVERROR(EINVAL);
-#if FF_API_OLD_CHANNEL_LAYOUT
- }
-FF_ENABLE_DEPRECATION_WARNINGS
- av_log(log_ctx, AV_LOG_WARNING, "Channel layout '%s' uses a deprecated syntax.\n",
- arg);
- if (mask)
- av_channel_layout_from_mask(&chlayout, mask);
- else
- chlayout = (AVChannelLayout) { .order = AV_CHANNEL_ORDER_UNSPEC, .nb_channels = nb_channels };
-#endif
+ av_log(log_ctx, AV_LOG_ERROR, "Invalid channel layout '%s'\n", arg);
+ return AVERROR(EINVAL);
}
if (chlayout.order == AV_CHANNEL_ORDER_UNSPEC && !nret) {
diff --git a/libavfilter/framepool.c b/libavfilter/framepool.c
index 0404589055..841caa0460 100644
--- a/libavfilter/framepool.c
+++ b/libavfilter/framepool.c
@@ -234,11 +234,6 @@ AVFrame *ff_frame_pool_get(FFFramePool *pool)
break;
case AVMEDIA_TYPE_AUDIO:
frame->nb_samples = pool->nb_samples;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->channels = pool->channels;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->ch_layout.nb_channels = pool->channels;
frame->format = pool->format;
frame->linesize[0] = pool->linesize[0];
diff --git a/libavfilter/tests/formats.c b/libavfilter/tests/formats.c
index 2bdceb0d21..ed1de24a4c 100644
--- a/libavfilter/tests/formats.c
+++ b/libavfilter/tests/formats.c
@@ -118,9 +118,6 @@ int main(void)
"65C",
"5.1",
"stereo",
- "1+1+1+1",
- "1c+1c+1c+1c",
- "2c+1c",
"0x3",
};