shithub: aubio

Download patch

ref: 4b9481f974ca00a27aff49e15cbcdca02de676c6
parent: be99a7ce16fbd8dd601f9c94a1df79e1ab6ded93
author: Paul Brossier <piem@piem.org>
date: Wed Dec 12 10:27:37 EST 2018

[io] abort sink_vorbis_do on error, remove unused variable

--- a/src/io/sink_vorbis.c
+++ b/src/io/sink_vorbis.c
@@ -30,8 +30,6 @@
 #include <errno.h> // errno
 #include <time.h> // time
 
-#define VORBIS_READSIZE 1024
-
 struct _aubio_sink_vorbis_t {
   FILE *fid;            // file id
   ogg_stream_state os;  // stream
@@ -224,6 +222,7 @@
     return;
   } else if (!buffer) {
     AUBIO_WRN("sink_vorbis: failed fetching buffer of size %d\n", write);
+    return;
   } else {
     for (c = 0; c < s->channels; c++) {
       for (v = 0; v < write; v++) {
@@ -247,6 +246,7 @@
     return;
   } else if (!buffer) {
     AUBIO_WRN("sink_vorbis: failed fetching buffer of size %d\n", write);
+    return;
   } else {
     for (c = 0; c < s->channels; c++) {
       for (v = 0; v < write; v++) {