From 06df24787ff37e6f08a870d52e2ed4c62d2caa11 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 6 Aug 2018 14:51:51 +0200 Subject: [PATCH] src/io/source_avcodec.c: give up if resampling context failed opening (see #148, closes #187) --- src/io/source_avcodec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index 8197445c0..6d8efa79f 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -275,6 +275,8 @@ aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, uint_t sa // default to mono output aubio_source_avcodec_reset_resampler(s, 0); + if (s->avr == NULL) goto beach; + s->eof = 0; s->multi = 0;