GNOME Bugzilla – Bug 326864
[wavparse] time to bytes format conversion broken
Last modified: 2006-01-18 19:10:31 UTC
There seems to be problems with e.g. IMA-ADPCM format when converting from GST_FORMAT_TIME to GST_FORMAT_BYTES, the dest_value gets wrong values due to blockalign. This patch should fix the problem. --- gstwavparse.c.orig 2005-12-28 16:04:44.000000000 +0200 +++ gstwavparse.c 2005-12-28 16:21:17.000000000 +0200 @@ -1104,8 +1104,8 @@ switch (*dest_format) { case GST_FORMAT_BYTES: /* make sure we end up on a sample boundary */ - *dest_value = - (src_value * wavparse->rate / GST_SECOND) * wavparse->blockalign; + *dest_value = src_value * wavparse->bps / GST_SECOND; + *dest_value -= *dest_value % wavparse->blockalign; break; case GST_FORMAT_DEFAULT: *dest_value = src_value * wavparse->rate / GST_SECOND;
Fixed in CVS, thanks for the patch! 2006-01-18 Tim-Philipp Müller <tim at centricular dot net> * gst/wavparse/gstwavparse.c: (gst_wavparse_pad_convert): Fix conversion from TIME to BYTES format (fixes #326864; patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>)