From 6551a683a00effb7daf5287d68f2ac4017344d8a Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 16 Nov 2018 21:18:14 +0100 Subject: [PATCH] [source] [avcodec] remove oldavr stuff --- src/io/source_avcodec.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index acc5375f..3b358bc5 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -308,10 +308,8 @@ void aubio_source_avcodec_reset_resampler(aubio_source_avcodec_t * s) int64_t output_layout = av_get_default_channel_layout(s->input_channels); #ifdef HAVE_AVRESAMPLE AVAudioResampleContext *avr = avresample_alloc_context(); - AVAudioResampleContext *oldavr = s->avr; #elif defined(HAVE_SWRESAMPLE) SwrContext *avr = swr_alloc(); - SwrContext *oldavr = s->avr; #endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ av_opt_set_int(avr, "in_channel_layout", input_layout, 0); @@ -339,15 +337,6 @@ void aubio_source_avcodec_reset_resampler(aubio_source_avcodec_t * s) return; } s->avr = avr; - if (oldavr != NULL) { -#ifdef HAVE_AVRESAMPLE - avresample_close( oldavr ); -#elif defined(HAVE_SWRESAMPLE) - swr_close ( oldavr ); -#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ - av_free ( oldavr ); - oldavr = NULL; - } } } -- 2.11.0