[FFmpeg-devel] [PATCH 11/11] aaccoder: zero ms_mask bands on execution

Rostislav Pehlivanov atomnuker at gmail.com
Fri Jun 26 22:16:40 CEST 2015


Coders other than twoloop require this to be set or else the marked bands would continue to be encoded via M/S until the end of the file.
---
 libavcodec/aaccoder.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 6b64c8e..5a6a243 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -1281,6 +1281,9 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
     float *L34 = s->scoefs, *R34 = s->scoefs + 128, *M34 = s->scoefs + 128*2, *S34 = s->scoefs + 128*3;
     SingleChannelElement *sce0 = &cpe->ch[0];
     SingleChannelElement *sce1 = &cpe->ch[1];
+
+    memset(cpe->ms_mask, 0, sizeof(uint8_t)*128);
+
     if (!cpe->common_window)
         return;
     for (w = 0; w < sce0->ics.num_windows; w += sce0->ics.group_len[w]) {
-- 
2.1.4



More information about the ffmpeg-devel mailing list