mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
gstpad: Move sticky flag clearing code to gst_pad_activate_mode
The ghostpad code directly activates/deactivates the child code by calling gst_pad_activate_mode, rather than gst_pad_set_active, so make sure to clear the flags in gst_pad_activate_mode(), which should catch all cases.
This commit is contained in:
parent
b277243fa6
commit
524b56cb07
1 changed files with 9 additions and 6 deletions
15
gst/gstpad.c
15
gst/gstpad.c
|
@ -950,12 +950,6 @@ gst_pad_set_active (GstPad * pad, gboolean active)
|
|||
if (G_UNLIKELY (!ret))
|
||||
goto failed;
|
||||
|
||||
if (!active) {
|
||||
GST_OBJECT_LOCK (pad);
|
||||
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_NEED_RECONFIGURE);
|
||||
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_EOS);
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
}
|
||||
return ret;
|
||||
|
||||
/* ERRORS */
|
||||
|
@ -1072,6 +1066,15 @@ gst_pad_activate_mode (GstPad * pad, GstPadMode mode, gboolean active)
|
|||
|
||||
exit_success:
|
||||
res = TRUE;
|
||||
|
||||
/* Clear sticky flags on deactivation */
|
||||
if (!active) {
|
||||
GST_OBJECT_LOCK (pad);
|
||||
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_NEED_RECONFIGURE);
|
||||
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_EOS);
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
}
|
||||
|
||||
exit:
|
||||
RELEASE_PARENT (parent);
|
||||
|
||||
|
|
Loading…
Reference in a new issue