[SCM] libav/experimental: Fail more gracefully for multichannel wavpack in another container.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:21:31 UTC 2013


The following commit has been merged in the experimental branch:
commit b82579a6ec54b155361d7e8f2e647bc335a6fb5d
Author: Carl Eugen Hoyos <cehoyos at rainbow.studorg.tuwien.ac.at>
Date:   Fri Jan 7 13:24:58 2011 +0000

    Fail more gracefully for multichannel wavpack in another container.
    
    Originally committed as revision 26253 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 57534c9..779fe80 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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list