Changeset 635:fb9b242e8cc6 in roaraudio for roard/codecfilter_celt.c
- Timestamp:
- 08/21/08 17:30:15 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/codecfilter_celt.c
r634 r635 32 32 self->encoder = NULL; 33 33 self->decoder = NULL; 34 self->opened = 0; 34 35 self->s_buf = s->info.channels * self->frame_size * 2; 35 36 self->ibuf = malloc(self->s_buf); … … 118 119 uint16_t fs; 119 120 char * cbuf; 121 char magic[ROAR_CELT_MAGIC_LEN]; 120 122 121 123 // printf("buf=%p, len=%i\n", buf, len); 124 125 if ( !self->opened ) { 126 errno = ENOSYS; 127 if ( stream_vio_s_read(self->stream, magic, ROAR_CELT_MAGIC_LEN) != ROAR_CELT_MAGIC_LEN ) 128 return -1; 129 if ( memcmp(magic, ROAR_CELT_MAGIC, ROAR_CELT_MAGIC_LEN) != 0 ) 130 return -1; 131 132 errno = 0; 133 self->opened = 1; 134 } 122 135 123 136 if ( self->fi_rest ) {
Note: See TracChangeset
for help on using the changeset viewer.