[FFmpeg-cvslog] aacenc: reorder resetting of cpe->common_window

Rostislav Pehlivanov git at videolan.org
Tue Sep 1 08:09:42 CEST 2015


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Tue Sep  1 07:00:10 2015 +0100| [a0079aae00a70ac7845941d4556419322a510bba] | committer: Rostislav Pehlivanov

aacenc: reorder resetting of cpe->common_window

Purely a cosmetic change, most of the zeroing of encoder resources
should happen at the top of the main loop.

Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>

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

 libavcodec/aacenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 1a845be..2f9b5e5 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -571,6 +571,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
             tag      = s->chan_map[i+1];
             chans    = tag == TYPE_CPE ? 2 : 1;
             cpe      = &s->cpe[i];
+            cpe->common_window = 0;
             memset(cpe->is_mask, 0, sizeof(cpe->is_mask));
             memset(cpe->ms_mask, 0, sizeof(cpe->ms_mask));
             put_bits(&s->pb, 3, tag);
@@ -590,7 +591,6 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
                 s->cur_channel = start_ch + ch;
                 s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda);
             }
-            cpe->common_window = 0;
             if (chans > 1
                 && wi[0].window_type[0] == wi[1].window_type[0]
                 && wi[0].window_shape   == wi[1].window_shape) {



More information about the ffmpeg-cvslog mailing list