@ -601,15 +601,18 @@ static int wma_decode_block(WMACodecContext *s)
if ( s - > channel_coded [ ch ] ) {
if ( s - > channel_coded [ ch ] ) {
int tindex ;
int tindex ;
WMACoef * ptr = & s - > coefs1 [ ch ] [ 0 ] ;
WMACoef * ptr = & s - > coefs1 [ ch ] [ 0 ] ;
int ret ;
/* special VLC tables are used for ms stereo because
/* special VLC tables are used for ms stereo because
* there is potentially less energy there */
* there is potentially less energy there */
tindex = ( ch = = 1 & & s - > ms_stereo ) ;
tindex = ( ch = = 1 & & s - > ms_stereo ) ;
memset ( ptr , 0 , s - > block_len * sizeof ( WMACoef ) ) ;
memset ( ptr , 0 , s - > block_len * sizeof ( WMACoef ) ) ;
ff_wma_run_level_decode ( s - > avctx , & s - > gb , & s - > coef_vlc [ tindex ] ,
ret = ff_wma_run_level_decode ( s - > avctx , & s - > gb , & s - > coef_vlc [ tindex ] ,
s - > level_table [ tindex ] , s - > run_table [ tindex ] ,
s - > level_table [ tindex ] , s - > run_table [ tindex ] ,
0 , ptr , 0 , nb_coefs [ ch ] ,
0 , ptr , 0 , nb_coefs [ ch ] ,
s - > block_len , s - > frame_len_bits , coef_nb_bits ) ;
s - > block_len , s - > frame_len_bits , coef_nb_bits ) ;
if ( ret < 0 )
return ret ;
}
}
if ( s - > version = = 1 & & s - > avctx - > channels > = 2 )
if ( s - > version = = 1 & & s - > avctx - > channels > = 2 )
align_get_bits ( & s - > gb ) ;
align_get_bits ( & s - > gb ) ;