Merge commit '09a098fb8bc7d70a0258b3e8d658833c8d11debe' into release/0.10

* commit '09a098fb8bc7d70a0258b3e8d658833c8d11debe':
  atrac3: fix error handling
  qdm2: check and reset dithering index per channel

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-09-14 11:05:54 +02:00
2 changed files with 3 additions and 3 deletions

View File

@@ -690,7 +690,8 @@ static int decodeChannelSoundUnit (ATRAC3Context *q, GetBitContext *gb, channel_
if (result) return result; if (result) return result;
pSnd->numComponents = decodeTonalComponents (gb, pSnd->components, pSnd->bandsCoded); pSnd->numComponents = decodeTonalComponents (gb, pSnd->components, pSnd->bandsCoded);
if (pSnd->numComponents == -1) return -1; if (pSnd->numComponents < 0)
return pSnd->numComponents;
numSubbands = decodeSpectrum (gb, pSnd->spectrum); numSubbands = decodeSpectrum (gb, pSnd->spectrum);

View File

@@ -784,8 +784,6 @@ static void synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int l
} }
for (sb = sb_min; sb < sb_max; sb++) { for (sb = sb_min; sb < sb_max; sb++) {
FIX_NOISE_IDX(q->noise_idx);
channels = q->nb_channels; channels = q->nb_channels;
if (q->nb_channels <= 1 || sb < 12) if (q->nb_channels <= 1 || sb < 12)
@@ -809,6 +807,7 @@ static void synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int l
} }
for (ch = 0; ch < channels; ch++) { for (ch = 0; ch < channels; ch++) {
FIX_NOISE_IDX(q->noise_idx);
zero_encoding = (BITS_LEFT(length,gb) >= 1) ? get_bits1(gb) : 0; zero_encoding = (BITS_LEFT(length,gb) >= 1) ? get_bits1(gb) : 0;
type34_predictor = 0.0; type34_predictor = 0.0;
type34_first = 1; type34_first = 1;