Changeset 4987:9335631d4e00 in roaraudio
- Timestamp:
- 05/20/11 12:15:25 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/codecfilter_vorbis.c
r4822 r4987 50 50 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p): r=%i", ptr, size, nmemb, datasource, r); 51 51 52 if ( r == -1 ) 52 if ( r == -1 ) { 53 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p) = 0 // roar_error=%i(%s)", ptr, size, nmemb, datasource, roar_error, roar_error2str(roar_error)); 53 54 return 0; 55 } 54 56 55 57 if ( r > 0 ) … … 235 237 long todo = len; 236 238 long done = 0; 237 238 // printf("cf_vorbis_read(inst=%p, buf=%p, len=%i) = ?\n", inst, buf, len); 239 int ret; 240 241 ROAR_DBG("cf_vorbis_read(inst=%p, buf=%p, len=%i) = ?", inst, buf, len); 239 242 240 243 self->opened++; 241 244 if ( self->opened == 16 ) { 242 245 243 //printf("cf_vorbis_read(*): opening...\n"); 244 if ( ov_open_callbacks((void*)self->stream, &(self->vf), NULL, 0, _g_cf_vorbis_vfvio) < 0 ) { 246 ROAR_DBG("cf_vorbis_read(*): opening..."); 247 if ( (ret = ov_open_callbacks((void*)self->stream, &(self->vf), NULL, 0, _g_cf_vorbis_vfvio)) < 0 ) { 248 ROAR_DBG("cf_vorbis_read(*): ret=%i", ret); 249 ROAR_DBG("cf_vorbis_read(*) = 0"); 245 250 return 0; 246 251 } 252 253 ROAR_DBG("cf_vorbis_read(*) = -1 // errno=EAGAIN"); 247 254 errno = EAGAIN; 248 255 return -1; … … 250 257 251 258 if ( self->opened < 16 ) { 259 ROAR_DBG("cf_vorbis_read(*) = -1 // errno=EAGAIN"); 252 260 errno = EAGAIN; 253 261 return -1; … … 259 267 while (todo) { 260 268 r = ov_read(&(self->vf), buf+done, todo, self->bigendianp, 2, 1, &(self->current_section)); 269 ROAR_DBG("cf_vorbis_read(*): r=%li", r); 261 270 if ( r == OV_HOLE ) { 262 271 ROAR_DBG("cf_vorbis_read(*): Hole in stream"); … … 274 283 } 275 284 276 //printf("ov_read(*) = %i\n", done);285 ROAR_DBG("ov_read(*) = %i", done); 277 286 278 287 if ( done == 0 ) { -
roard/streams.c
r4967 r4987 222 222 #endif 223 223 224 roar_vio_ clear_calls(&(s->vio));224 roar_vio_init_calls(&(s->vio)); 225 225 roar_vio_clear_calls(&(s->jumbo)); 226 226 s->viop = &(s->vio); … … 2621 2621 errno = 0; 2622 2622 2623 if ( !stream ) 2624 return -1; 2623 if ( stream == NULL ) { 2624 roar_err_set(ROAR_ERROR_FAULT); 2625 return -1; 2626 } 2625 2627 2626 2628 //roar_vio_set_fh(&(stream->vio), ROAR_STREAM(stream)->fh); 2627 2629 2628 if ( ! stream->vio.read ) 2629 return -1; 2630 if ( ! stream->vio.read ) { 2631 roar_err_set(ROAR_ERROR_NOTSUP); 2632 return -1; 2633 } 2630 2634 2631 2635 while ( (r = roar_vio_read(&(stream->vio), buf, count)) > 0 ) { … … 2668 2672 errno = 0; 2669 2673 2670 if ( !stream ) 2671 return -1; 2674 if ( stream == NULL ) { 2675 roar_err_set(ROAR_ERROR_FAULT); 2676 return -1; 2677 } 2672 2678 2673 2679 /*
Note: See TracChangeset
for help on using the changeset viewer.