From: Paul Brossier Date: Fri, 16 Nov 2018 20:18:14 +0000 (+0100) Subject: [source] [avcodec] remove oldavr stuff X-Git-Tag: 0.4.8~55 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=6551a683a00effb7daf5287d68f2ac4017344d8a;p=aubio.git [source] [avcodec] remove oldavr stuff --- 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; - } } }