diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index b4fc761fa1..db0954ba1a 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -555,7 +555,7 @@ static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr) k = sbr->n_master; } while (sb != sbr->kx[1] + sbr->m[1]); - if (sbr->patch_num_subbands[sbr->num_patches-1] < 3 && sbr->num_patches > 1) + if (sbr->num_patches > 1 && sbr->patch_num_subbands[sbr->num_patches-1] < 3) sbr->num_patches--; return 0;