Changeset 638:f7cdb2c9bb59 in roaraudio


Ignore:
Timestamp:
08/21/08 18:26:35 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

in error case we should cancel playback as errors may/will result in buffer overflow!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter_celt.c

    r637 r638  
    147147 
    148148  if ( fs > self->s_buf ) 
    149    break; 
     149   return -1; 
    150150 
    151151  if ( stream_vio_s_read(self->stream, self->ibuf, fs) != fs ) 
    152    break; 
     152   return -1; 
    153153 
    154154  cbuf = buf + r; 
     
    156156//  printf("buf=%p, r=%i // cbuf=%p\n", buf, r, cbuf); 
    157157  if ( celt_decode(self->decoder, (unsigned char *) self->ibuf, fs, (celt_int16_t *) cbuf) < 0 ) 
    158    break; 
     158   return -1; 
    159159 
    160160  r += self->s_buf; 
     
    166166   fs = ROAR_NET2HOST16(fs); 
    167167//   printf("next: fs=%i\n", fs); 
     168   if ( fs > self->s_buf ) 
     169    return -1; 
    168170   if ( stream_vio_s_read(self->stream, self->ibuf, fs) == fs ) { 
    169171//    printf("got data!\n"); 
Note: See TracChangeset for help on using the changeset viewer.