mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
mimic: Hold element lock while accessing the clock
This commit is contained in:
parent
140a3038c5
commit
092a5b798c
1 changed files with 3 additions and 2 deletions
|
@ -456,14 +456,15 @@ paused_mode_task (gpointer data)
|
||||||
GstClockTimeDiff diff;
|
GstClockTimeDiff diff;
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
|
|
||||||
|
GST_OBJECT_LOCK (mimenc);
|
||||||
|
|
||||||
if (!GST_ELEMENT_CLOCK (mimenc)) {
|
if (!GST_ELEMENT_CLOCK (mimenc)) {
|
||||||
|
GST_OBJECT_UNLOCK (mimenc);
|
||||||
GST_ERROR_OBJECT (mimenc, "Element has no clock");
|
GST_ERROR_OBJECT (mimenc, "Element has no clock");
|
||||||
gst_pad_pause_task (mimenc->srcpad);
|
gst_pad_pause_task (mimenc->srcpad);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_OBJECT_LOCK (mimenc);
|
|
||||||
|
|
||||||
if (mimenc->stop_paused_mode) {
|
if (mimenc->stop_paused_mode) {
|
||||||
GST_OBJECT_UNLOCK (mimenc);
|
GST_OBJECT_UNLOCK (mimenc);
|
||||||
goto stop_task;
|
goto stop_task;
|
||||||
|
|
Loading…
Reference in a new issue