[FFmpeg-soc] [soc]: r4901 - wmapro/wmaprodec.c
faust3
subversion at mplayerhq.hu
Sun Aug 2 11:43:13 CEST 2009
Author: faust3
Date: Sun Aug 2 11:43:13 2009
New Revision: 4901
Log:
initialize scale factors when decoding of a new frame starts
Modified:
wmapro/wmaprodec.c
Modified: wmapro/wmaprodec.c
==============================================================================
--- wmapro/wmaprodec.c Sun Aug 2 03:20:26 2009 (r4900)
+++ wmapro/wmaprodec.c Sun Aug 2 11:43:13 2009 (r4901)
@@ -1179,17 +1179,6 @@ static int decode_subframe(WMA3DecodeCon
s->channel[c].coeffs = &s->channel[c].out[(s->samples_per_frame>>1)
+ offset];
memset(s->channel[c].coeffs,0,sizeof(float) * subframe_len);
-
- /** init some things if this is the first subframe */
- if (!s->channel[c].cur_subframe) {
- s->channel[c].scale_factor_step = 1;
- s->channel[c].max_scale_factor = 0;
- memset(s->channel[c].scale_factors, 0,
- sizeof(s->channel[c].scale_factors));
- memset(s->channel[c].resampled_scale_factors, 0,
- sizeof(s->channel[c].resampled_scale_factors));
- }
-
}
s->subframe_len = subframe_len;
@@ -1418,6 +1407,12 @@ static int decode_frame(WMA3DecodeContex
s->channel[i].decoded_samples = 0;
s->channel[i].cur_subframe = 0;
s->channel[i].reuse_sf = 0;
+ s->channel[i].scale_factor_step = 1;
+ s->channel[i].max_scale_factor = 0;
+ memset(s->channel[i].scale_factors, 0,
+ sizeof(s->channel[i].scale_factors));
+ memset(s->channel[i].resampled_scale_factors, 0,
+ sizeof(s->channel[i].resampled_scale_factors));
}
/** decode all subframes */
More information about the FFmpeg-soc
mailing list