shithub: aubio

Download patch

ref: 56fa1e0abf7fb78a68c4d722b6afef325b6d28f6
parent: 4c37e8749e7abfb79b8035e6588d3f50fe8c8984
author: Paul Brossier <piem@piem.org>
date: Mon Dec 17 10:10:37 EST 2018

[io] sink_vorbis: prevent crash when closing twice

--- a/src/io/sink_vorbis.c
+++ b/src/io/sink_vorbis.c
@@ -291,6 +291,7 @@
 
 uint_t aubio_sink_vorbis_close (aubio_sink_vorbis_t *s)
 {
+  if (!s->fid) return AUBIO_FAIL;
   //mark the end of stream
   vorbis_analysis_wrote(&s->vd, 0);