[FFmpeg-cvslog] avcodec/dca_exss: always update downmix flags

foo86 git at videolan.org
Mon May 23 22:56:50 CEST 2016


ffmpeg | branch: master | foo86 <foobaz86 at gmail.com> | Mon May 23 18:41:27 2016 +0300| [9bd1d79584c6f99ec12c85c458eaa9ca826b2d12] | committer: Michael Niedermayer

avcodec/dca_exss: always update downmix flags

Fixes potential parsing failure when total number of channels indicated
by EXSS asset descriptor decreases mid-stream and stale embedded downmix
flags are referenced.

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9bd1d79584c6f99ec12c85c458eaa9ca826b2d12
---

 libavcodec/dca_exss.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/dca_exss.c b/libavcodec/dca_exss.c
index 87b2f42..28f138f 100644
--- a/libavcodec/dca_exss.c
+++ b/libavcodec/dca_exss.c
@@ -112,12 +112,10 @@ static int parse_descriptor(DCAExssParser *s, DCAExssAsset *asset)
             int nspeakers[8];
 
             // Embedded stereo flag
-            if (asset->nchannels_total > 2)
-                asset->embedded_stereo = get_bits1(&s->gb);
+            asset->embedded_stereo = asset->nchannels_total > 2 && get_bits1(&s->gb);
 
             // Embedded 6 channels flag
-            if (asset->nchannels_total > 6)
-                asset->embedded_6ch = get_bits1(&s->gb);
+            asset->embedded_6ch = asset->nchannels_total > 6 && get_bits1(&s->gb);
 
             // Speaker mask enabled flag
             if (asset->spkr_mask_enabled = get_bits1(&s->gb)) {



More information about the ffmpeg-cvslog mailing list