shithub: aubio

Download patch

ref: e0ad2699296c9b3b29a9b677ad61823cf7ccdaba
parent: 2b3c4380d82093aa95a5a57f317a774495335ada
author: Paul Brossier <piem@piem.org>
date: Wed Nov 30 12:14:38 EST 2016

src/io/source_avcodec.c: improve error messages

--- a/src/io/source_avcodec.c
+++ b/src/io/source_avcodec.c
@@ -351,12 +351,12 @@
   int len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, &avPacket);
 
   if (len < 0) {
-    AUBIO_ERR("Error while decoding %s\n", s->path);
+    AUBIO_ERR("source_avcodec: error while decoding %s\n", s->path);
     goto beach;
   }
 #endif
   if (got_frame == 0) {
-    //AUBIO_ERR("Could not get frame for (%s)\n", s->path);
+    AUBIO_WRN("source_avcodec: did not get a frame when reading %s\n", s->path);
     goto beach;
   }
 
@@ -370,7 +370,7 @@
         (uint8_t **)&output, out_linesize, max_out_samples,
         (uint8_t **)avFrame->data, in_linesize, in_samples);
   if (out_samples <= 0) {
-    //AUBIO_ERR("No sample found while converting frame (%s)\n", s->path);
+    AUBIO_WRN("source_avcodec: no sample found while converting frame (%s)\n", s->path);
     goto beach;
   }