[Bug 744090] New: mpegtsmux doesn't permit to add stream during play
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Feb 6 03:47:13 PST 2015
https://bugzilla.gnome.org/show_bug.cgi?id=744090
GStreamer | gst-plugins-bad | git master
Summary: mpegtsmux doesn't permit to add stream during play
Classification: Platform
Product: GStreamer
Version: git master
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-bad
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: andreas at schulerdev.de
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
When mpegtsmux is in PLAYING oder PAUSED state, I can add sink-pads, but when I
activate it and put data in, I get the Error:
Stream on pad sink_xxx is not associated with any program.
With this patch, a new pad is added to the default, when it is not associated
with any program. So it's possible to simply add streams during state PLAYING
and PAUSED.
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index 975c926..6df698d 100644
--- a/gst/mpegtsmux/mpegtsmux.c
+++ b/gst/mpegtsmux/mpegtsmux.c
@@ -1117,6 +1117,25 @@ mpegtsmux_collected_buffer (GstCollectPads * pads,
GstCollectData * data,
return GST_FLOW_OK;
}
+ if((best->prog) == NULL) {
+ GST_WARNING_OBJECT (mux, "Stream on pad %"
+ GST_PTR_FORMAT " was not associated with any program, adding to default
program",
+ COLLECT_DATA_PAD (best));
+
+ best->prog_id = DEFAULT_PROG_ID;
+ best->prog = mux->programs[best->prog_id];
+
+ if(best->stream == NULL) {
+ ret = mpegtsmux_create_stream (mux, best);
+ if (ret != GST_FLOW_OK) {
+ GST_ELEMENT_ERROR (mux, STREAM, MUX, ("Stream on pad %"
+ GST_PTR_FORMAT " is not associated with any program",
+ COLLECT_DATA_PAD (best)),(NULL));
+ return GST_FLOW_ERROR;
+ }
+ }
+ }
+
prog = best->prog;
if (prog == NULL)
goto no_program;
--
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