aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Brereton <nick@nbrereton.net>2012-10-30 22:38:42 +0000
committerMichael Niedermayer <michaelni@gmx.at>2012-10-31 14:49:46 +0100
commit09ea482d5dd1920ea8653eb7369e2d1434c40905 (patch)
treeca011034abaac6a6043569029c116007375321a5
parentbe0b37c649d19ee21c024b11f53bcc39674fca3b (diff)
downloadffmpeg-09ea482d5dd1920ea8653eb7369e2d1434c40905.tar.gz
Fix #1827, segfault with XXCH samples when downsampling.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dcadec.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index d35cc3f976..6c97623842 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -448,7 +448,6 @@ typedef struct {
int xxch_chset_nch[4];
float xxch_dmix_sf[DCA_CHSETS_MAX];
- uint32_t xxch_downmix; /* downmix enabled per channel set */
uint32_t xxch_dmix_embedded; /* lower layer has mix pre-embedded, per chset */
float xxch_dmix_coeff[DCA_PRIM_CHANNELS_MAX][32]; /* worst case sizing */
@@ -597,7 +596,6 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel,
s->xxch_dmix_sf[s->xxch_chset] = scale_factor;
for (i = base_channel; i < s->prim_channels; i++) {
- s->xxch_downmix |= (1 << i);
mask[i] = get_bits(&s->gb, s->xxch_nbits_spk_mask);
}
@@ -1905,7 +1903,6 @@ static int dca_xxch_decode_frame(DCAContext *s)
core_spk = get_bits(&s->gb, spkmsk_bits);
s->xxch_core_spkmask = core_spk;
s->xxch_nbits_spk_mask = spkmsk_bits;
- s->xxch_downmix = 0;
s->xxch_dmix_embedded = 0;
/* skip to the end of the header */
@@ -2268,7 +2265,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
- s->xxch_downmix = 0;
+ s->xxch_dmix_embedded = 0;
} else {
/* we only get here if an XXCH channel set can be added to the mix */
channel_mask = s->xxch_core_spkmask;