mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
adaptive_demux: tests: improved validation of pads
When removing a pad, the on_demuxPadRemoved function must find a stream for that pad. https://bugzilla.gnome.org/show_bug.cgi?id=760328
This commit is contained in:
parent
7ed4f6f03f
commit
13f66a68ed
1 changed files with 17 additions and 21 deletions
|
@ -344,21 +344,18 @@ on_demuxPadRemoved (GstElement * demux, GstPad * pad, gpointer user_data)
|
|||
GstAdaptiveDemuxTestEnginePrivate *priv =
|
||||
(GstAdaptiveDemuxTestEnginePrivate *) user_data;
|
||||
GstAdaptiveDemuxTestOutputStream *stream = NULL;
|
||||
GstStateChangeReturn ret;
|
||||
GstState currentState, pending;
|
||||
GstElement *appSink;
|
||||
|
||||
fail_unless (priv != NULL);
|
||||
|
||||
GST_DEBUG ("Pad removed: %" GST_PTR_FORMAT, pad);
|
||||
|
||||
GST_TEST_LOCK (priv);
|
||||
stream = getTestOutputDataByPad (priv, pad, FALSE);
|
||||
if (stream) {
|
||||
GstStateChangeReturn ret;
|
||||
GstState currentState, pending;
|
||||
GstElement *appSink;
|
||||
|
||||
stream = getTestOutputDataByPad (priv, pad, TRUE);
|
||||
if (priv->callbacks->demux_pad_removed) {
|
||||
priv->callbacks->demux_pad_removed (&priv->engine, stream,
|
||||
priv->user_data);
|
||||
priv->callbacks->demux_pad_removed (&priv->engine, stream, priv->user_data);
|
||||
}
|
||||
fail_unless (stream->appsink != NULL);
|
||||
fail_unless (stream->internal_pad != NULL);
|
||||
|
@ -371,7 +368,6 @@ on_demuxPadRemoved (GstElement * demux, GstPad * pad, gpointer user_data)
|
|||
GST_DEBUG ("Changing AppSink element to PAUSED");
|
||||
gst_element_set_state (appSink, GST_STATE_PAUSED);
|
||||
}
|
||||
}
|
||||
GST_TEST_UNLOCK (priv);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue