[FFmpeg-devel] [PATCH]Keep user from encoding multichannel alac
Carl Eugen Hoyos
cehoyos at ag.or.at
Thu May 19 00:25:33 CEST 2011
Hi!
Encoding succeeds, but the file cannot be read by FFmpeg and QuickTime.
I will apply if nobody objects, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index c3a1fdf..bb618e1 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -389,6 +389,11 @@ static av_cold int alac_encode_init(AVCodecContext *avctx)
return -1;
}
+ if(avctx->channels > 2) {
+ av_log(avctx, AV_LOG_ERROR, "channels > 2 not 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-devel
mailing list