[Bug 794168] streamiddemux: Not settings caps before adding pads
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Mar 14 11:12:17 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=794168
--- Comment #2 from Vinod Kesti <vinodkesti at yahoo.com> ---
Sebastian,
I am planning to provide patch for this bug. I modified code as below to add
pad on SEGMENT/CAPS event. With this patch testsrc pipeline works (Withrout
encoders) but other pipeline still throw error.
Can some one help me to point out issue in below code.
if (GST_EVENT_TYPE (event) == GST_EVENT_STREAM_START) {
gst_event_parse_stream_start (event, &demux->stream_id);
if (!demux->stream_id)
goto no_stream_id;
}
else if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) {
GST_OBJECT_LOCK (demux);
active_srcpad =
gst_streamid_demux_get_srcpad_by_stream_id (demux, demux->stream_id);
if (!active_srcpad) {
/* try to generate a srcpad */
if (gst_streamid_demux_srcpad_create (demux, pad, demux->stream_id)) {
GST_OBJECT_UNLOCK (demux);
gst_pad_set_active (demux->active_srcpad, TRUE);
/* Forward sticky events to the new srcpad */
gst_pad_sticky_events_foreach (demux->sinkpad, forward_sticky_events,
demux->active_srcpad);
gst_element_add_pad (GST_ELEMENT_CAST (demux), demux->active_srcpad);
} else {
GST_OBJECT_UNLOCK (demux);
goto fail_create_srcpad;
}
} else if (demux->active_srcpad != active_srcpad) {
demux->active_srcpad = active_srcpad;
GST_OBJECT_UNLOCK (demux);
//gst_pad_sticky_events_foreach (demux->sinkpad, forward_sticky_events,
// demux->active_srcpad);
g_object_notify (G_OBJECT (demux), "active-pad");
} else
GST_OBJECT_UNLOCK (demux);
}
--
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