summaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2011-01-07 13:24:58 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2011-01-07 13:24:58 +0000
commitb82579a6ec54b155361d7e8f2e647bc335a6fb5d (patch)
tree0c68040e8cdb83ac5963bafc71f4c7234522eb3f /libavcodec/wavpack.c
parentee77f986a2f7af4ae1fb0f07d302828e08a1a2f7 (diff)
Fail more gracefully for multichannel wavpack in another container.
Originally committed as revision 26253 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 57534c9dfa..779fe80e3e 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -660,6 +660,10 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx)
WavpackContext *s = avctx->priv_data;
s->avctx = avctx;
+ if (avctx->channels > 2) {
+ av_log(avctx, AV_LOG_ERROR, "Multichannel WavPack is not supported yet.\n");
+ return -1;
+ }
s->stereo = (avctx->channels == 2);
if(avctx->bits_per_coded_sample <= 16)
avctx->sample_fmt = AV_SAMPLE_FMT_S16;