[PATCH 2/2] icydemux: activate srcpad before setting caps
Anton Novikov
random.plant at gmail.com
Tue May 22 04:10:51 PDT 2012
Before gst_pad_set_active() is called, the pad has
FLUSHING flag set, so setting the caps fails
---
gst/icydemux/gsticydemux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gst/icydemux/gsticydemux.c b/gst/icydemux/gsticydemux.c
index 757d19d..4265529 100644
--- a/gst/icydemux/gsticydemux.c
+++ b/gst/icydemux/gsticydemux.c
@@ -231,6 +231,7 @@ gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps)
g_return_val_if_fail (icydemux->srcpad != NULL, FALSE);
gst_pad_use_fixed_caps (icydemux->srcpad);
+ gst_pad_set_active (icydemux->srcpad, TRUE);
if (icydemux->src_caps) {
if (!gst_pad_set_caps (icydemux->srcpad, icydemux->src_caps))
@@ -240,7 +241,6 @@ gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps)
GST_DEBUG_OBJECT (icydemux, "Adding src pad with caps %" GST_PTR_FORMAT,
icydemux->src_caps);
- gst_pad_set_active (icydemux->srcpad, TRUE);
if (!(gst_element_add_pad (GST_ELEMENT (icydemux), icydemux->srcpad)))
return FALSE;
gst_element_no_more_pads (GST_ELEMENT (icydemux));
--
1.7.10.2
More information about the gstreamer-devel
mailing list