ac3enc: remove check for mismatching channels and channel_layout
authorJustin Ruggles <justin.ruggles@gmail.com>
Tue, 19 Apr 2011 23:06:52 +0000 (19:06 -0400)
committerJustin Ruggles <justin.ruggles@gmail.com>
Wed, 27 Apr 2011 16:57:43 +0000 (12:57 -0400)
libavcodec/ac3enc.c

index 77647d4..1f3c92a 100644 (file)
@@ -1988,8 +1988,6 @@ static av_cold int set_channel_info(AC3EncodeContext *s, int channels,
     ch_layout = *channel_layout;
     if (!ch_layout)
         ch_layout = avcodec_guess_channel_layout(channels, CODEC_ID_AC3, NULL);
-    if (av_get_channel_layout_nb_channels(ch_layout) != channels)
-        return AVERROR(EINVAL);
 
     s->lfe_on       = !!(ch_layout & AV_CH_LOW_FREQUENCY);
     s->channels     = channels;