diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-17 23:54:21 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-22 01:19:30 +0200 |
commit | 66e297fc848a6ec90143b4ace005b4503665e909 (patch) | |
tree | 6749a85d23d21f321f4104fbcf22a78357606b61 | |
parent | 65dbc83eec2656786b901ed15569d7044c6c6dee (diff) | |
download | ffmpeg-66e297fc848a6ec90143b4ace005b4503665e909.tar.gz |
avcodec/dcaenc: Remove dead checks for unspec channel layouts
This encoder has AVCodec.ch_layouts set, so ff_encode_preinit()
ensures that the used channel layout is equivalent to one of
these.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/dcaenc.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index d0de6d3eee..0996296d8c 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -222,13 +222,6 @@ static int encode_init(AVCodecContext *avctx) if (ff_dcaadpcm_init(&c->adpcm_ctx)) return AVERROR(ENOMEM); - if (layout.order == AV_CHANNEL_ORDER_UNSPEC) { - av_log(avctx, AV_LOG_WARNING, "No channel layout specified. The " - "encoder will guess the layout, but it " - "might be incorrect.\n"); - av_channel_layout_default(&layout, layout.nb_channels); - } - if (!av_channel_layout_compare(&layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_MONO)) c->channel_config = 0; else if (!av_channel_layout_compare(&layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO)) @@ -239,10 +232,6 @@ static int encode_init(AVCodecContext *avctx) c->channel_config = 9; else if (!av_channel_layout_compare(&layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT1)) c->channel_config = 9; - else { - av_log(avctx, AV_LOG_ERROR, "Unsupported channel layout!\n"); - return AVERROR_PATCHWELCOME; - } if (c->lfe_channel) { c->fullband_channels--; |