GNOME Bugzilla – Bug 157548
[vorbisenc] premature and/or missing terminator to gst_caps_new_simple()
Last modified: 2004-12-22 21:47:04 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
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
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.