Merge commit '930ffd46e1e742674aa7cc1c2450020c63b5015b'

* commit '930ffd46e1e742674aa7cc1c2450020c63b5015b':
  aacsbr: change order of operation to prevent out of array read

Conflicts:
	libavcodec/aacsbr.c

See: c2340831b8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/94/head
Michael Niedermayer 10 years ago
commit df82125acb
  1. 3
      libavcodec/aacsbr.c

@ -556,7 +556,8 @@ static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr)
k = sbr->n_master;
} while (sb != sbr->kx[1] + sbr->m[1]);
if (sbr->num_patches > 1 && sbr->patch_num_subbands[sbr->num_patches-1] < 3)
if (sbr->num_patches > 1 &&
sbr->patch_num_subbands[sbr->num_patches - 1] < 3)
sbr->num_patches--;
return 0;

Loading…
Cancel
Save