[FFmpeg-cvslog] latm: avoid unnecessary reinit of the aac decoder

Janne Grunau git at videolan.org
Wed Oct 26 02:46:26 CEST 2011


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Fri Oct 21 17:13:03 2011 +0200| [785f876cee7b55fe54007da00759a8f1cf81db36] | committer: Janne Grunau

latm: avoid unnecessary reinit of the aac decoder

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

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

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index d1774a1..6000fe1 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2509,8 +2509,9 @@ static int latm_decode_frame(AVCodecContext *avctx, void *out, int *out_size,
             *out_size = 0;
             return avpkt->size;
         } else {
-            aac_decode_close(avctx);
-            if ((err = aac_decode_init(avctx)) < 0)
+            if ((err = decode_audio_specific_config(
+                    &latmctx->aac_ctx, avctx, &latmctx->aac_ctx.m4ac,
+                    avctx->extradata, avctx->extradata_size)) < 0)
                 return err;
             latmctx->initialized = 1;
         }



More information about the ffmpeg-cvslog mailing list