[FFmpeg-soc] [soc]: r5544 - aac-sbr/aacsbr.c

alexc subversion at mplayerhq.hu
Wed Dec 16 23:21:25 CET 2009


Author: alexc
Date: Wed Dec 16 23:21:24 2009
New Revision: 5544

Log:
Make reset state available to ff_sbr_apply().

Make sbr->reset true for the entire duration of each frame in which a
reset occurs.

Modified:
   aac-sbr/aacsbr.c

Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c	Wed Dec 16 13:36:07 2009	(r5543)
+++ aac-sbr/aacsbr.c	Wed Dec 16 23:21:24 2009	(r5544)
@@ -815,7 +815,6 @@ static void sbr_reset(AACContext *ac, Sp
     err = sbr_make_f_master(ac, sbr, &sbr->spectrum_params[1]);
     if (err >= 0)
         err = sbr_make_f_derived(ac, sbr);
-    sbr->reset = 0;
     if (err < 0) {
         av_log(ac->avccontext, AV_LOG_ERROR, "SBR reset failed. Switching SBR to pure upsampling mode.\n");
         sbr->start = 0;
@@ -839,6 +838,8 @@ int ff_decode_sbr_extension(AACContext *
     GetBitContext *gb = &gbc;
     skip_bits_long(gb_host, cnt*8 - 4);
 
+    sbr->reset = 0;
+
     if (!sbr->sample_rate)
         sbr->sample_rate = 2 * ac->m4ac.sample_rate; //TODO use the nominal sample rate for arbitrary sample rate support
 


More information about the FFmpeg-soc mailing list