[Bug 740195] [PATCH] mpg123: Handle src pads with no caps set
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sun Nov 16 02:07:17 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=740195
GStreamer | gst-plugins-bad | git
Sebastian Dröge (slomo) <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #290776|none |reviewed
status| |
--- Comment #1 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-11-16 10:07:12 UTC ---
Review of attachment 290776:
--> (https://bugzilla.gnome.org/review?bug=740195&attachment=290776)
::: ext/mpg123/gstmpg123audiodec.c
@@ +511,3 @@
gst_pad_get_allowed_caps (GST_AUDIO_DECODER_SRC_PAD (dec));
+ if (allowed_srccaps_unnorm) {
+ allowed_srccaps = gst_caps_normalize (allowed_srccaps_unnorm);
Using gst_caps_normalize() is a really bad idea usually. It creates huge caps,
instead use the other caps/structure API :)
@@ +613,3 @@
+
+ GST_DEBUG_OBJECT (dec, "srcpad has no caps set - using default format %s",
+ format_str);
It is rather that downstream is not linked yet and thus you can't ask for the
allowed caps. Nothing except for mpg123 itself is setting the caps on the
srcpad. What other code is usually doing if get_allowed_caps() returns NULL is
to just use the srcpad template caps instead and go through the same code path
otherwise. This prevents some code duplication and bigger special casing.
--
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