[FFmpeg-cvslog] AAC encoder: fix possible assertion failure in PNS

Claudio Freire git at videolan.org
Tue Dec 22 09:26:48 CET 2015


ffmpeg | branch: master | Claudio Freire <klaussfreire at gmail.com> | Tue Dec 22 05:26:12 2015 -0300| [4720a562c8d45b15c49ea3535a8e74933b1ac260] | committer: Claudio Freire

AAC encoder: fix possible assertion failure in PNS

Fix possible SF delta violation that would cause an
eventual assertion failure in some corner cases (esp
on very low bitrates) when marking bands for PNS due
to misuse of the sf_delta utilities

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4720a562c8d45b15c49ea3535a8e74933b1ac260
---

 libavcodec/aaccoder.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 15d467b..6fcc6a0 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -726,9 +726,10 @@ static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChanne
                 sce->band_type[w*16+g] = NOISE_BT;
                 sce->zeroes[w*16+g] = 0;
                 prev = noise_sfi;
+            } else {
+                if (!sce->zeroes[w*16+g])
+                    prev_sf = sce->sf_idx[w*16+g];
             }
-            if (!sce->zeroes[w*16+g])
-                prev_sf = sce->sf_idx[w*16+g];
         }
     }
 }



More information about the ffmpeg-cvslog mailing list