diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index f2982584d4add941538bb602160a3e9143ad1edc..be954dd9f8f31b03303b14b6363b011e5189bbdc 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -677,8 +677,10 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
                     float mindist = INFINITY;
                     int minbits = 0;
 
-                    if (sce->zeroes[w*16+g] || sce->sf_idx[w*16+g] >= 218)
+                    if (sce->zeroes[w*16+g] || sce->sf_idx[w*16+g] >= 218) {
+                        start += sce->ics.swb_sizes[g];
                         continue;
+                    }
                     minscaler = FFMIN(minscaler, sce->sf_idx[w*16+g]);
                     for (cb = 0; cb <= ESC_BT; cb++) {
                         float dist = 0.0f;
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index dfa519059c9bbf7cde11fe3edfc8dc12ec077792..cc233dd24d50e392d371c30c7c7526f03ec16445 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -193,7 +193,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
     lengths[1] = ff_aac_num_swb_128[i];
     ff_psy_init(&s->psy, avctx, 2, sizes, lengths);
     s->psypp = ff_psy_preprocess_init(avctx);
-    s->coder = &ff_aac_coders[0];
+    s->coder = &ff_aac_coders[2];
 
     s->lambda = avctx->global_quality ? avctx->global_quality : 120;
 #if !CONFIG_HARDCODED_TABLES