src/io/source_avcodec.c: give up if resampling context failed opening (see #137,...
[aubio.git] / src / io / source_avcodec.c
index 8197445..6d8efa7 100644 (file)
@@ -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;