- Timestamp:
- Dec 21, 2018, 8:06:39 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
- Children:
- 8fe522d
- Parents:
- 00c9444 (diff), 1c565c0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/io
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink.c
r00c9444 r4cb2d54 217 217 void del_aubio_sink(aubio_sink_t * s) { 218 218 AUBIO_ASSERT(s); 219 if (s ->s_del && s->sink)219 if (s && s->s_del && s->sink) 220 220 s->s_del((void *)s->sink); 221 221 AUBIO_FREE(s); -
src/io/source.c
r00c9444 r4cb2d54 140 140 void del_aubio_source(aubio_source_t * s) { 141 141 AUBIO_ASSERT(s); 142 if (s ->s_del && s->source)142 if (s && s->s_del && s->source) 143 143 s->s_del((void *)s->source); 144 144 AUBIO_FREE(s); -
src/io/source_apple_audio.c
r00c9444 r4cb2d54 345 345 "error in ExtAudioFileGetProperty (%s)\n", s->path, 346 346 getPrintableOSStatusError(errorstr, err)); 347 return err;347 return 0; 348 348 } 349 349 return (uint_t)fileLengthFrames; -
src/io/source_avcodec.c
r00c9444 r4cb2d54 492 492 uint_t length = aubio_source_validate_input_length("source_avcodec", s->path, 493 493 s->hop_size, read_data->length); 494 if (!s->avr || !s->avFormatCtx || !s->avCodecCtx) { 495 AUBIO_ERR("source_avcodec: could not read from %s (file was closed)\n", 496 s->path); 497 *read= 0; 498 return; 499 } 494 500 while (total_wrote < length) { 495 501 end = MIN(s->read_samples - s->read_index, length - total_wrote); … … 530 536 uint_t channels = aubio_source_validate_input_channels("source_avcodec", 531 537 s->path, s->input_channels, read_data->height); 538 if (!s->avr || !s->avFormatCtx || !s->avCodecCtx) { 539 AUBIO_ERR("source_avcodec: could not read from %s (file was closed)\n", 540 s->path); 541 *read= 0; 542 return; 543 } 532 544 while (total_wrote < length) { 533 545 end = MIN(s->read_samples - s->read_index, length - total_wrote); -
src/io/source_sndfile.c
r00c9444 r4cb2d54 175 175 sf_count_t read_samples = aubio_sf_read_smpl (s->handle, s->scratch_data, 176 176 s->scratch_size); 177 if (!s->handle) { 178 AUBIO_ERR("source_sndfile: could not read from %s (file was closed)\n", 179 s->path); 180 *read = 0; 181 return; 182 } 177 183 178 184 uint_t read_length = read_samples / s->input_channels; … … 220 226 sf_count_t read_samples = aubio_sf_read_smpl (s->handle, s->scratch_data, 221 227 s->scratch_size); 228 if (!s->handle) { 229 AUBIO_ERR("source_sndfile: could not read from %s (file was closed)\n", 230 s->path); 231 *read = 0; 232 return; 233 } 222 234 223 235 uint_t read_length = read_samples / s->input_channels;
Note: See TracChangeset
for help on using the changeset viewer.