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 157548 - [vorbisenc] premature and/or missing terminator to gst_caps_new_simple()
[vorbisenc] premature and/or missing terminator to gst_caps_new_simple()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.8.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-11-06 22:25 UTC by Tim-Philipp Müller
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (765 bytes, patch)
2004-11-06 22:29 UTC, Tim-Philipp Müller
none Details | Review

Description Tim-Philipp Müller 2004-11-06 22:25:52 UTC
This looks dodgy. Note the additional NULL after the "channels" property. I 
presume this is what's intended: 
 
diff -u -r1.63 vorbisenc.c 
--- ext/vorbis/vorbisenc.c      18 Oct 2004 13:55:48 -0000      1.63 
+++ ext/vorbis/vorbisenc.c      6 Nov 2004 22:21:14 -0000 
@@ -163,9 +163,11 @@ 
   return 
       gst_caps_new_simple ("audio/x-raw-float", 
       "rate", GST_TYPE_INT_RANGE, 8000, 50000, 
-      "channels", GST_TYPE_INT_RANGE, 1, 2, NULL, 
+      "channels", GST_TYPE_INT_RANGE, 1, 2, 
       "endianness", G_TYPE_INT, G_BYTE_ORDER, 
-      "width", G_TYPE_INT, 32, "buffer-frames", G_TYPE_INT, 0); 
+      "width", G_TYPE_INT, 32, 
+      "buffer-frames", G_TYPE_INT, 0, 
+      NULL); 
 } 
 
In any case, either the superfluous arguments should be removed, or the 
premature terminator removed and moved to the end where it's missing. 
 
Cheers  
 -Tim
Comment 1 Tim-Philipp Müller 2004-11-06 22:29:15 UTC
Created attachment 33506 [details] [review]
proposed fix

Proposed fix attached. 

Needs double-checking to see which caps the element is really supposed to have.
Looking at vorbisdec's src caps, I'd guess that the whole bunch of attributes
is desired.

Cheers
 -Tim
Comment 2 Ronald Bultje 2004-11-06 22:49:58 UTC
Yeah. There's one issue: buffer-frames=0 means 'nothing', but that means it
should accept *any* value for buffer-frames. Leaving that for if someone finds out.