After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 326601 - GstRingBuffer crashes with alaw/mulaw caps
GstRingBuffer crashes with alaw/mulaw caps
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.0
Other All
: Normal normal
: 0.10.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-11 14:02 UTC by Tommi Myöhänen
Modified: 2006-01-11 15:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tommi Myöhänen 2006-01-11 14:02:09 UTC
Please describe the problem:
It is not possible to create a source element (based on audiosink) that has 
following caps:

"audio/x-alaw, "
"rate = (int)8000, "
"channels = (int) 1"

"audio/x-ulaw, "
"rate = (int)8000, "
"channels = (int) 1"

If such element is tried to be made, gstringbuffer.c throws floating point 
exception because there is division by zero situation.


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Problem can be fixed with following patch:

Index: gstringbuffer.c
===================================================================
--- gstringbuffer.c.orig        2005-12-09 12:47:30.000000000 +0200
+++ gstringbuffer.c     2005-12-12 17:27:19.000000000 +0200
@@ -302,9 +302,13 @@
   } else if (!strncmp (mimetype, "audio/x-alaw", 12)) {
     spec->type = GST_BUFTYPE_A_LAW;
     spec->format = GST_A_LAW;
+    spec->width = 8;
+    spec->depth = 8;
   } else if (!strncmp (mimetype, "audio/x-mulaw", 13)) {
     spec->type = GST_BUFTYPE_MU_LAW;
     spec->format = GST_MU_LAW;
+    spec->width = 8;
+    spec->depth = 8;
   } else {
     goto parse_error;
   }
Comment 1 Tim-Philipp Müller 2006-01-11 15:14:01 UTC
Fixed in CVS, thanks for the patch!

2006-01-11  Tommi Myöhänen  <ext-tommi dot myohanen at nokia dot com>

       * gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_parse_caps):
         Set depth and width for alaw/mulaw (fixes #326601).