ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Sat Sep 17 23:54:21 2022 +0200| [66e297fc848a6ec90143b4ace005b4503665e909] | committer: Andreas Rheinhardt
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.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=66e297fc848a6ec90143b4ace005b4503665e909 --- libavcodec/dcaenc.c | 11 ----------- 1 file changed, 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--; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".