[SCM] libav/experimental: add check for invalid channel mode when coupling is used

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:21:41 UTC 2013


The following commit has been merged in the experimental branch:
commit 3af91313983b54d76aadda0f80ef7fc72aa9d5cf
Author: Justin Ruggles <justin.ruggles at gmail.com>
Date:   Sun May 25 15:23:03 2008 +0000

    add check for invalid channel mode when coupling is used
    
    Originally committed as revision 13381 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 257687e..ae9f2ea 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -818,6 +818,11 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk)
             /* coupling in use */
             int cpl_begin_freq, cpl_end_freq;
 
+            if (channel_mode < AC3_CHMODE_STEREO) {
+                av_log(s->avctx, AV_LOG_ERROR, "coupling not allowed in mono or dual-mono\n");
+                return -1;
+            }
+
             /* determine which channels are coupled */
             for (ch = 1; ch <= fbw_channels; ch++)
                 s->channel_in_cpl[ch] = get_bits1(gbc);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list