From: Paul Brossier Date: Thu, 5 Dec 2013 13:01:18 +0000 (-0500) Subject: tests/src/io/test-source_avcodec.c: really abort on error X-Git-Tag: 0.4.0-beta1~52^2~19 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=23bf0018a7a50b642c06204a8bb66fe69ddbbcce;p=aubio.git tests/src/io/test-source_avcodec.c: really abort on error --- diff --git a/tests/src/io/test-source_avcodec.c b/tests/src/io/test-source_avcodec.c index 70c2ca59..0da12b8b 100644 --- a/tests/src/io/test-source_avcodec.c +++ b/tests/src/io/test-source_avcodec.c @@ -26,9 +26,8 @@ int main (int argc, char **argv) fvec_t *vec = new_fvec(hop_size); aubio_source_avcodec_t * s = new_aubio_source_avcodec(source_path, samplerate, hop_size); - if (samplerate == 0 ) samplerate = aubio_source_avcodec_get_samplerate(s); - if (!s) { err = 1; goto beach; } + if (samplerate == 0 ) samplerate = aubio_source_avcodec_get_samplerate(s); do { aubio_source_avcodec_do(s, vec, &read); @@ -36,8 +35,8 @@ int main (int argc, char **argv) n_frames += read; } while ( read == hop_size ); -beach: del_aubio_source_avcodec (s); +beach: del_fvec (vec); #else err = 3;