Changeset 7cc80b6
- Timestamp:
- Nov 30, 2016, 4:35:55 PM (8 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, sampler, yinfft+
- Children:
- 18a96aa
- Parents:
- 57405c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_avcodec.c
r57405c1 r7cc80b6 238 238 uint_t output_channels = multi ? s->input_channels : 1; 239 239 int64_t output_layout = av_get_default_channel_layout(output_channels); 240 if (s->avr != NULL) { 241 avresample_close( s->avr ); 242 av_free ( s->avr ); 243 s->avr = NULL; 244 } 245 AVAudioResampleContext *avr = s->avr; 246 avr = avresample_alloc_context(); 240 AVAudioResampleContext *avr = avresample_alloc_context(); 241 AVAudioResampleContext *oldavr = s->avr; 247 242 248 243 av_opt_set_int(avr, "in_channel_layout", input_layout, 0); … … 268 263 } 269 264 s->avr = avr; 265 if (oldavr != NULL) { 266 avresample_close( oldavr ); 267 av_free ( oldavr ); 268 oldavr = NULL; 269 } 270 270 s->multi = multi; 271 271 }
Note: See TracChangeset
for help on using the changeset viewer.