gst/wavparse/gstwavparse.c: Fix conversion from TIME to BYTES format (fixes #326864;

Original commit message from CVS:
* 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>)
This commit is contained in:
Tommi Myöhänen 2006-01-18 19:08:08 +00:00 committed by Tim-Philipp Müller
parent 83b6cbc438
commit c275b14170
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
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>)
2006-01-15 Jan Schmidt <thaytan@mad.scientist.com>
* gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame):

View file

@ -1215,8 +1215,8 @@ gst_wavparse_pad_convert (GstPad * pad,
case GST_FORMAT_BYTES:
/* make sure we end up on a sample boundary */
*dest_value =
gst_util_uint64_scale_int (src_value, wavparse->rate,
GST_SECOND) * wavparse->blockalign;
gst_util_uint64_scale_int (src_value, wavparse->bps, GST_SECOND);
*dest_value -= *dest_value % wavparse->blockalign;
break;
case GST_FORMAT_DEFAULT:
*dest_value =