mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
aggregator: Hold SRC_LOCK while unblocking via SRC_BROADCAST()
Otherwise the clock id we access might not be a valid pointer anymore. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/656>
This commit is contained in:
parent
30151e6f40
commit
b2b1610907
1 changed files with 4 additions and 0 deletions
|
@ -1837,7 +1837,9 @@ gst_aggregator_change_state (GstElement * element, GstStateChange transition)
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
/* Wake up any waiting as now we have a clock and can do
|
/* Wake up any waiting as now we have a clock and can do
|
||||||
* proper waiting on the clock if necessary */
|
* proper waiting on the clock if necessary */
|
||||||
|
SRC_LOCK (self);
|
||||||
SRC_BROADCAST (self);
|
SRC_BROADCAST (self);
|
||||||
|
SRC_UNLOCK (self);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -1859,7 +1861,9 @@ gst_aggregator_change_state (GstElement * element, GstStateChange transition)
|
||||||
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
||||||
/* Wake up any waiting as now clock might be gone and we might
|
/* Wake up any waiting as now clock might be gone and we might
|
||||||
* need to wait on the condition variable again */
|
* need to wait on the condition variable again */
|
||||||
|
SRC_LOCK (self);
|
||||||
SRC_BROADCAST (self);
|
SRC_BROADCAST (self);
|
||||||
|
SRC_UNLOCK (self);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue