shithub: aubio

Download patch

ref: 6551a683a00effb7daf5287d68f2ac4017344d8a
parent: ac97e80da513b91230b74b3e6178953139b8b923
author: Paul Brossier <piem@piem.org>
date: Fri Nov 16 16:18:14 EST 2018

[source] [avcodec] remove oldavr stuff

--- a/src/io/source_avcodec.c
+++ b/src/io/source_avcodec.c
@@ -308,10 +308,8 @@
     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 @@
       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;
-    }
   }
 }