From 79dc9adb6a541b1929227ded5d53730686fbc3d6 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 23 Dec 2018 05:44:18 +0100 Subject: [PATCH] [source_avcodec] show a warning only when an error occurred in swr_convert --- src/io/source_avcodec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index 257e30ff..30f77cd0 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -463,9 +463,9 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, (uint8_t **)&output, max_out_samples, (const uint8_t **)avFrame->data, in_samples); #endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ - if (out_samples <= 0) { - AUBIO_WRN("source_avcodec: no sample found while converting frame (%s)\n", - s->path); + if (out_samples < 0) { + AUBIO_WRN("source_avcodec: error while resampling %s (%d)\n", + s->path, out_samples); goto beach; } -- 2.11.0