mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 20:20:38 +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/630>
This commit is contained in:
parent
7d12aa07d4
commit
46305b292f
1 changed files with 4 additions and 0 deletions
|
@ -1883,7 +1883,9 @@ gst_aggregator_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
/* Wake up any waiting as now we have a clock and can do
|
||||
* proper waiting on the clock if necessary */
|
||||
SRC_LOCK (self);
|
||||
SRC_BROADCAST (self);
|
||||
SRC_UNLOCK (self);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1905,7 +1907,9 @@ gst_aggregator_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
||||
/* Wake up any waiting as now clock might be gone and we might
|
||||
* need to wait on the condition variable again */
|
||||
SRC_LOCK (self);
|
||||
SRC_BROADCAST (self);
|
||||
SRC_UNLOCK (self);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue