Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-bad gst-plugins-bad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 989
    • Issues 989
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 132
    • Merge requests 132
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gst-plugins-badgst-plugins-bad
  • Issues
  • #208

Closed
Open
Created Feb 06, 2015 by Bugzilla Migration User@bugzilla-migration

mpegtsmux: add support for adding/removing streams at runtime

Submitted by Andreas Schuler

Link to original bug (#744090)

Description

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;
Assignee
Assign to
Time tracking