summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aaccoder.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 6fcc6a0eab..2c125fd080 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -643,8 +643,11 @@ static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChanne
const int start = wstart+sce->ics.swb_offset[g];
const float freq = (start-wstart)*freq_mult;
const float freq_boost = FFMAX(0.88f*freq/NOISE_LOW_LIMIT, 1.0f);
- if (freq < NOISE_LOW_LIMIT || (start-wstart) >= cutoff)
+ if (freq < NOISE_LOW_LIMIT || (start-wstart) >= cutoff) {
+ if (!sce->zeroes[w*16+g])
+ prev_sf = sce->sf_idx[w*16+g];
continue;
+ }
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g];
sfb_energy += band->energy;