[FFmpeg-cvslog] alacenc: do not generate invalid multi-channel ALAC files

Justin Ruggles git at videolan.org
Wed Jan 4 01:39:33 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Wed Dec  7 12:04:21 2011 -0500| [149e1b0468ca8828fe198025c4662a957871bd02] | committer: Justin Ruggles

alacenc: do not generate invalid multi-channel ALAC files

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=149e1b0468ca8828fe198025c4662a957871bd02
---

 libavcodec/alacenc.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index 7e29a24..e7977b3 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;



More information about the ffmpeg-cvslog mailing list