wtay gst-plugins-good: gst-plugins-good/ gst-plugins-good/gst/wavparse/

[email protected]
Newsgroups gmane.comp.video.gstreamer.cvs
Message-ID <[email protected]>
CVS Root:       /cvs/gstreamer
Module:         gst-plugins-good
Changes by:     wtay
Date:           Thu Nov 20 2008  20:07:40 UTC

Log message:
* gst/wavparse/gstwavparse.c: (uint64_ceiling_scale_int),
(uint64_ceiling_scale), (gst_wavparse_calculate_duration),
(gst_wavparse_stream_headers):
Fix the scaling code.
Fix parsing of the INFO chunks, we were reading the wrong number of
bytes.  Fixes #561580.

Modified files:
    .               : ChangeLog
    gst/wavparse    : gstwavparse.c

Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3823&r2=1.3824
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/wavparse/gstwavparse.c.diff?r1=1.165&r2=1.166

====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v
retrieving revision 1.3823
retrieving revision 1.3824
diff -u -d -r1.3823 -r1.3824
--- ChangeLog	20 Nov 2008 14:30:35 -0000	1.3823
+++ ChangeLog	20 Nov 2008 20:07:24 -0000	1.3824
@@ -1,3 +1,12 @@
+2008-11-20  Wim Taymans  <[email protected]>
+
+	* gst/wavparse/gstwavparse.c: (uint64_ceiling_scale_int),
+	(uint64_ceiling_scale), (gst_wavparse_calculate_duration),
+	(gst_wavparse_stream_headers):
+	Fix the scaling code.
+	Fix parsing of the INFO chunks, we were reading the wrong number of
+	bytes.  Fixes #561580.
 2008-11-20  Jan Schmidt  <[email protected]>
 
 	* gst/matroska/matroska-mux.c:
Index: gstwavparse.c
RCS file: /cvs/gstreamer/gst-plugins-good/gst/wavparse/gstwavparse.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- gstwavparse.c	5 Aug 2008 15:05:44 -0000	1.165
+++ gstwavparse.c	20 Nov 2008 20:07:26 -0000	1.166
@@ -248,7 +248,7 @@
 static guint64
 uint64_ceiling_scale_int (guint64 val, gint num, gint denom)
 {
-  guint64 result = gst_util_uint64_scale (val, num, denom);
+  guint64 result = gst_util_uint64_scale_int (val, num, denom);
   if (uint64_scale_modulo (val, num, denom) == 0)
     return result;
@@ -260,7 +260,7 @@
 uint64_ceiling_scale (guint64 val, guint64 num, guint64 denom)
-  guint64 result = gst_util_uint64_scale_int (val, num, denom);
+  guint64 result = gst_util_uint64_scale (val, num, denom);
@@ -1046,6 +1046,7 @@
     return TRUE;
   if (wav->bps > 0) {
+    GST_INFO_OBJECT (wav, "Got datasize %" G_GUINT64_FORMAT, wav->datasize);
     wav->duration =
         uint64_ceiling_scale (wav->datasize, GST_SECOND, (guint64) wav->bps);
     GST_INFO_OBJECT (wav, "Got duration (bps) %" GST_TIME_FORMAT,
@@ -1371,7 +1372,7 @@
         }
         switch (ltag) {
           case GST_RIFF_LIST_INFO:{
-            const guint data_size = size - 12;
+            const guint data_size = size - 4;
             GstTagList *new;
             GST_INFO_OBJECT (wav, "Have LIST chunk INFO");

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.