mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
mpegdemux: start pushing data again when a pad gets linked later
The whole not_linked optimisation is really a bit dodgy here, but let's leave it in place for now and at least start pushing data again when a pad got linked later, in which case we should get a RECONFIGURE event.
This commit is contained in:
parent
2a93e71e67
commit
074d6347d1
1 changed files with 28 additions and 0 deletions
|
@ -547,6 +547,23 @@ unknown_stream:
|
|||
}
|
||||
}
|
||||
|
||||
static GstPsStream *
|
||||
gst_ps_demux_get_stream_from_pad (GstPsDemux * demux, GstPad * srcpad)
|
||||
{
|
||||
gint i, count;
|
||||
|
||||
count = demux->found_count;
|
||||
for (i = 0; i < count; i++) {
|
||||
GstPsStream *stream = demux->streams_found[i];
|
||||
|
||||
if (stream && stream->pad == srcpad)
|
||||
return stream;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (srcpad, "no stream found for pad!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void
|
||||
gst_ps_demux_send_segment (GstPsDemux * demux, GstPsStream * stream,
|
||||
GstClockTime pts)
|
||||
|
@ -1324,6 +1341,17 @@ gst_ps_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
res = gst_ps_demux_handle_seek_push (demux, event);
|
||||
}
|
||||
break;
|
||||
case GST_EVENT_RECONFIGURE:{
|
||||
GstPsStream *stream;
|
||||
|
||||
stream = gst_ps_demux_get_stream_from_pad (demux, pad);
|
||||
if (stream != NULL)
|
||||
stream->notlinked = FALSE;
|
||||
|
||||
gst_event_unref (event);
|
||||
res = TRUE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_push_event (demux->sinkpad, event);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue