mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
playsinconvert: clear the probe id when removing
This commit is contained in:
parent
3b09cfe54d
commit
ea672b68a1
2 changed files with 10 additions and 6 deletions
|
@ -205,6 +205,7 @@ pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
unblock:
|
unblock:
|
||||||
|
self->sink_proxypad_block_id = 0;
|
||||||
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
|
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
|
||||||
|
|
||||||
return GST_PROBE_REMOVE;
|
return GST_PROBE_REMOVE;
|
||||||
|
@ -215,6 +216,7 @@ link_failed:
|
||||||
(NULL), ("Failed to configure the audio converter."));
|
(NULL), ("Failed to configure the audio converter."));
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (self->srcpad),
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (self->srcpad),
|
||||||
self->sink_proxypad);
|
self->sink_proxypad);
|
||||||
|
self->sink_proxypad_block_id = 0;
|
||||||
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
|
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
|
||||||
|
|
||||||
return GST_PROBE_REMOVE;
|
return GST_PROBE_REMOVE;
|
||||||
|
|
|
@ -186,6 +186,7 @@ pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
unblock:
|
unblock:
|
||||||
|
self->sink_proxypad_block_id = 0;
|
||||||
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
|
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
|
||||||
|
|
||||||
return GST_PROBE_REMOVE;
|
return GST_PROBE_REMOVE;
|
||||||
|
@ -196,6 +197,7 @@ link_failed:
|
||||||
(NULL), ("Failed to configure the video converter."));
|
(NULL), ("Failed to configure the video converter."));
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (self->srcpad),
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (self->srcpad),
|
||||||
self->sink_proxypad);
|
self->sink_proxypad);
|
||||||
|
self->sink_proxypad_block_id = 0;
|
||||||
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
|
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
|
||||||
|
|
||||||
return GST_PROBE_REMOVE;
|
return GST_PROBE_REMOVE;
|
||||||
|
@ -205,12 +207,12 @@ link_failed:
|
||||||
static void
|
static void
|
||||||
block_proxypad (GstPlaySinkVideoConvert * self)
|
block_proxypad (GstPlaySinkVideoConvert * self)
|
||||||
{
|
{
|
||||||
if (self->sink_proxypad_block_id != 0)
|
if (self->sink_proxypad_block_id == 0) {
|
||||||
return;
|
self->sink_proxypad_block_id =
|
||||||
|
gst_pad_add_probe (self->sink_proxypad, GST_PROBE_TYPE_BLOCK,
|
||||||
self->sink_proxypad_block_id =
|
pad_blocked_cb, gst_object_ref (self),
|
||||||
gst_pad_add_probe (self->sink_proxypad, GST_PROBE_TYPE_BLOCK,
|
(GDestroyNotify) gst_object_unref);
|
||||||
pad_blocked_cb, gst_object_ref (self), (GDestroyNotify) gst_object_unref);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue