Changeset 5300:190af1adf91c in roaraudio for libroar


Ignore:
Timestamp:
11/25/11 10:05:31 (10 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

first commit to move away from old roar_buffer_add() to roar_buffer_moveinto() (See: #126)

Location:
libroar
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libroar/buffer.c

    r5299 r5300  
    582582  memcpy(nd, od, cur->user_len); 
    583583 
    584   _LIBROAR_IGNORE_RET(roar_buffer_add(*copy, new)); 
     584  _LIBROAR_IGNORE_RET(roar_buffer_moveinto(*copy, &new)); 
    585585 
    586586  cur = cur->next; 
  • libroar/vio_buffer_store.c

    r5278 r5300  
    123123  self->in = nbuf; 
    124124 } else { 
    125   if ( roar_buffer_add(self->in, nbuf) == -1 ) { 
     125  if ( roar_buffer_moveinto(self->in, &nbuf) == -1 ) { 
    126126   roar_buffer_free(nbuf); 
    127127   return -1; 
  • libroar/vio_pipe.c

    r5278 r5300  
    348348     self->b.b[idx] = next; 
    349349    } else { 
    350      if ( roar_buffer_add(self->b.b[idx], next) == -1 ) { 
     350     if ( roar_buffer_moveinto(self->b.b[idx], &next) == -1 ) { 
    351351      roar_buffer_free(next); 
    352352      return -1; 
  • libroar/vio_zlib.c

    r5278 r5300  
    299299   self->inbuf = leftbuf; 
    300300  } else { 
    301    if ( roar_buffer_add(self->inbuf, leftbuf) == -1 ) { 
     301   if ( roar_buffer_moveinto(self->inbuf, &leftbuf) == -1 ) { 
    302302    roar_buffer_free(leftbuf); 
    303303    roar_err_set((self->decompressor_error = ROAR_ERROR_LOSTSYNC)); 
     
    402402     self->outbuf = leftbuf; 
    403403    } else { 
    404      if ( roar_buffer_add(self->outbuf, leftbuf) == -1 ) { 
     404     if ( roar_buffer_moveinto(self->outbuf, &leftbuf) == -1 ) { 
    405405      roar_buffer_free(leftbuf); 
    406406      roar_err_set((self->compressor_error = ROAR_ERROR_LOSTSYNC)); 
Note: See TracChangeset for help on using the changeset viewer.