From: Justin Ruggles Date: Wed, 7 Dec 2011 17:04:21 +0000 (-0500) Subject: alacenc: do not generate invalid multi-channel ALAC files X-Git-Tag: n0.10~80^2~285 X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=149e1b0468ca8828fe198025c4662a957871bd02;hp=e76c7b856f7aab9d8e3a42f61142eda30fc0749e alacenc: do not generate invalid multi-channel ALAC files --- diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c index 7e29a24c6f..e7977b3cf7 100644 --- a/libavcodec/alacenc.c +++ b/libavcodec/alacenc.c @@ -391,6 +391,14 @@ static av_cold int alac_encode_init(AVCodecContext *avctx) return -1; } + /* TODO: Correctly implement multi-channel ALAC. + It is similar to multi-channel AAC, in that it has a series of + single-channel (SCE), channel-pair (CPE), and LFE elements. */ + if (avctx->channels > 2) { + av_log(avctx, AV_LOG_ERROR, "only mono or stereo input is currently supported\n"); + return AVERROR_PATCHWELCOME; + } + // Set default compression level if (avctx->compression_level == FF_COMPRESSION_DEFAULT) s->compression_level = 2;