[vlc-commits] Print an errorr if a resampler skipped input frames

Rémi Denis-Courmont git at videolan.org
Wed Oct 19 17:25:30 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct 19 18:24:04 2011 +0300| [32f5d458ac560709e7b601c0e91908765bdf6392] | committer: Rémi Denis-Courmont

Print an errorr if a resampler skipped input frames

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32f5d458ac560709e7b601c0e91908765bdf6392
---

 modules/audio_filter/resampler/speex.c |    4 ++++
 modules/audio_filter/resampler/src.c   |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/audio_filter/resampler/speex.c b/modules/audio_filter/resampler/speex.c
index 06ebec7..4bee5e8 100644
--- a/modules/audio_filter/resampler/speex.c
+++ b/modules/audio_filter/resampler/speex.c
@@ -135,6 +135,10 @@ static block_t *Resample (filter_t *filter, block_t *in)
         goto error;
     }
 
+    if (ilen < in->i_nb_samples)
+        msg_Err (filter, "lost %"PRIu32" of %u input frames",
+                 in->i_nb_samples - ilen, in->i_nb_samples);
+
     out->i_buffer = olen * framesize;
     out->i_nb_samples = olen;
     out->i_pts = in->i_pts;
diff --git a/modules/audio_filter/resampler/src.c b/modules/audio_filter/resampler/src.c
index 75e531c..18ed0cf 100644
--- a/modules/audio_filter/resampler/src.c
+++ b/modules/audio_filter/resampler/src.c
@@ -139,8 +139,8 @@ static block_t *Resample (filter_t *filter, block_t *in)
     }
 
     if (src.input_frames_used < src.input_frames)
-        msg_Warn (filter, "lost %ld of %ld input frames",
-                  src.input_frames - src.input_frames_used, src.input_frames);
+        msg_Err (filter, "lost %ld of %ld input frames",
+                 src.input_frames - src.input_frames_used, src.input_frames);
 
     out->i_buffer = src.output_frames_gen * framesize;
     out->i_nb_samples = src.output_frames_gen;



More information about the vlc-commits mailing list