[Bug 650406] vorbisdec does not handle headers in caps
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed May 18 04:04:25 PDT 2011
https://bugzilla.gnome.org/show_bug.cgi?id=650406
GStreamer | gst-plugins-base | 0.10.33
Sebastian Dröge <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #187973|none |needs-work
status| |
--- Comment #1 from Sebastian Dröge <slomo at circular-chaos.org> 2011-05-18 11:04:24 UTC ---
Review of attachment 187973:
--> (https://bugzilla.gnome.org/review?bug=650406&attachment=187973)
Looks good in general and doing something like this for vorbis, theora, etc was
on my TODO list too :)
Just some minor things that need to be improved:
::: ext/vorbis/gstvorbisdec.c
@@ +1014,3 @@
+{
+ GstFlowReturn result = GST_FLOW_OK;
+ GstCaps *caps = GST_BUFFER_CAPS (buffer);
You should get the caps from the sinkpad instead, the buffer might have NULL
caps
@@ +1023,3 @@
+
+ /* initial header */
+ value = gst_value_array_get_value (array, 0);
First check here if the array has at least 3 elements
@@ +1024,3 @@
+ /* initial header */
+ value = gst_value_array_get_value (array, 0);
+ buf = gst_value_get_buffer (value);
And check if it really contains buffers and error out otherwise
@@ +1085,3 @@
+ /* try to find header in caps so we can initialize the decoder */
+ if (!vd->initialized)
+ (void) vorbis_dec_handle_header_caps (vd, buffer);
Return GST_FLOW_NOT_NEGOTIATED in that function if something fails and return
that value from here instead of trying to continue
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list