mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
collectpads: don't forward random stream-start event
It's not right, and we don't know what extra properties that event might have set in future (e.g. sparseness). This change means collectpad users need to create their own stream-start event now. We could add a utility function that creates a stream-start event based on the input stream-start events.
This commit is contained in:
parent
b582ec5c81
commit
226d96f107
1 changed files with 3 additions and 11 deletions
|
@ -107,7 +107,6 @@ struct _GstCollectPadsPrivate
|
|||
{
|
||||
/* with LOCK and/or STREAM_LOCK */
|
||||
gboolean started;
|
||||
gboolean stream_started;
|
||||
|
||||
/* with STREAM_LOCK */
|
||||
guint32 cookie; /* @data list cookie */
|
||||
|
@ -234,7 +233,6 @@ gst_collect_pads_init (GstCollectPads * pads)
|
|||
pads->priv->queuedpads = 0;
|
||||
pads->priv->eospads = 0;
|
||||
pads->priv->started = FALSE;
|
||||
pads->priv->stream_started = FALSE;
|
||||
|
||||
g_rec_mutex_init (&pads->stream_lock);
|
||||
|
||||
|
@ -871,7 +869,6 @@ gst_collect_pads_stop (GstCollectPads * pads)
|
|||
unref_data (pads->priv->earliest_data);
|
||||
pads->priv->earliest_data = NULL;
|
||||
pads->priv->earliest_time = GST_CLOCK_TIME_NONE;
|
||||
pads->priv->stream_started = FALSE;
|
||||
|
||||
GST_OBJECT_UNLOCK (pads);
|
||||
/* Wake them up so they can end the chain functions. */
|
||||
|
@ -1715,14 +1712,9 @@ gst_collect_pads_event_default (GstCollectPads * pads, GstCollectData * data,
|
|||
goto eat;
|
||||
}
|
||||
case GST_EVENT_STREAM_START:
|
||||
/* let the only the first one go through */
|
||||
if (!pads->priv->stream_started) {
|
||||
pads->priv->stream_started = TRUE;
|
||||
goto forward;
|
||||
} else {
|
||||
goto eat;
|
||||
}
|
||||
break;
|
||||
/* drop stream start events, element must create its own start event,
|
||||
* we can't just forward the first random stream start event we get */
|
||||
goto eat;
|
||||
case GST_EVENT_CAPS:
|
||||
goto eat;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue