mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
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>
This commit is contained in:
parent
65dbc83eec
commit
66e297fc84
@ -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--;
|
||||
|
Loading…
Reference in New Issue
Block a user