@ -261,6 +261,7 @@ static int setup_partitions(VP8Context *s, const uint8_t *buf, int buf_size)
{
const uint8_t * sizes = buf ;
int i ;
int ret ;
s - > num_coeff_partitions = 1 < < vp8_rac_get_uint ( & s - > c , 2 ) ;
@ -274,13 +275,13 @@ static int setup_partitions(VP8Context *s, const uint8_t *buf, int buf_size)
if ( buf_size - size < 0 )
return - 1 ;
ff_vp56_init_range_decoder ( & s - > coeff_partition [ i ] , buf , size ) ;
ret = ff_vp56_init_range_decoder ( & s - > coeff_partition [ i ] , buf , size ) ;
if ( ret < 0 )
return ret ;
buf + = size ;
buf_size - = size ;
}
ff_vp56_init_range_decoder ( & s - > coeff_partition [ i ] , buf , buf_size ) ;
return 0 ;
return ff_vp56_init_range_decoder ( & s - > coeff_partition [ i ] , buf , buf_size ) ;
}
static void vp7_get_quants ( VP8Context * s )
@ -518,7 +519,9 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
memcpy ( s - > put_pixels_tab , s - > vp8dsp . put_vp8_epel_pixels_tab , sizeof ( s - > put_pixels_tab ) ) ;
ff_vp56_init_range_decoder ( c , buf , part1_size ) ;
ret = ff_vp56_init_range_decoder ( c , buf , part1_size ) ;
if ( ret < 0 )
return ret ;
buf + = part1_size ;
buf_size - = part1_size ;
@ -570,7 +573,9 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
s - > lf_delta . enabled = 0 ;
s - > num_coeff_partitions = 1 ;
ff_vp56_init_range_decoder ( & s - > coeff_partition [ 0 ] , buf , buf_size ) ;
ret = ff_vp56_init_range_decoder ( & s - > coeff_partition [ 0 ] , buf , buf_size ) ;
if ( ret < 0 )
return ret ;
if ( ! s - > macroblocks_base | | /* first frame */
width ! = s - > avctx - > width | | height ! = s - > avctx - > height | |
@ -699,7 +704,9 @@ static int vp8_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
memset ( & s - > lf_delta , 0 , sizeof ( s - > lf_delta ) ) ;
}
ff_vp56_init_range_decoder ( c , buf , header_size ) ;
ret = ff_vp56_init_range_decoder ( c , buf , header_size ) ;
if ( ret < 0 )
return ret ;
buf + = header_size ;
buf_size - = header_size ;