Changeset 422452b for src/io/source_avcodec.c
- Timestamp:
- Jan 26, 2014, 8:19:31 PM (10 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 3cc3fd8
- Parents:
- a9fd272
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_avcodec.c
ra9fd272 r422452b 391 391 } 392 392 393 void del_aubio_source_avcodec(aubio_source_avcodec_t * s){ 394 if (!s) return; 395 if (s->output != NULL) { 396 av_free(s->output); 397 } 393 uint_t aubio_source_avcodec_close(aubio_source_avcodec_t * s) { 398 394 if (s->avr != NULL) { 399 395 avresample_close( s->avr ); … … 401 397 } 402 398 s->avr = NULL; 403 if (s->avFrame != NULL) {404 avcodec_free_frame( &(s->avFrame) );405 }406 s->avFrame = NULL;407 399 if (s->avCodecCtx != NULL) { 408 400 avcodec_close ( s->avCodecCtx ); … … 412 404 avformat_close_input ( &(s->avFormatCtx) ); 413 405 } 406 s->avFormatCtx = NULL; 407 return AUBIO_OK; 408 } 409 410 void del_aubio_source_avcodec(aubio_source_avcodec_t * s){ 411 if (!s) return; 412 aubio_source_avcodec_close(s); 413 if (s->output != NULL) { 414 av_free(s->output); 415 } 416 s->output = NULL; 417 if (s->avFrame != NULL) { 418 avcodec_free_frame( &(s->avFrame) ); 419 } 414 420 s->avFrame = NULL; 415 s->avFormatCtx = NULL;416 421 AUBIO_FREE(s); 417 422 }
Note: See TracChangeset
for help on using the changeset viewer.