From e5cd2d3dca3bbba1961ee373fde24c5e112b0d80 Mon Sep 17 00:00:00 2001
From: Benjamin Larsson <banan@ludd.ltu.se>
Date: Fri, 15 May 2009 16:25:54 +0000
Subject: [PATCH] Bugfix for bug introduced in the multichannel cook patchset.

Originally committed as revision 18842 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/cook.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index a33222bf0e7..fa9dc2b7cef 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -1141,9 +1141,10 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
                 av_log(avctx,AV_LOG_DEBUG,"MONO\n");
                 break;
             case STEREO:
-                if (q->nb_channels != 1)
+                if (q->nb_channels != 1) {
                     q->subpacket[s].bits_per_subpdiv = 1;
-                q->subpacket[s].num_channels = 2;
+                    q->subpacket[s].num_channels = 2;
+                }
                 av_log(avctx,AV_LOG_DEBUG,"STEREO\n");
                 break;
             case JOINT_STEREO:
-- 
GitLab