mimic: Hold element lock while accessing the clock

This commit is contained in:
Olivier Crête 2009-10-12 19:31:38 -04:00
parent 140a3038c5
commit 092a5b798c

View file

@ -456,14 +456,15 @@ paused_mode_task (gpointer data)
GstClockTimeDiff diff;
GstFlowReturn ret;
GST_OBJECT_LOCK (mimenc);
if (!GST_ELEMENT_CLOCK (mimenc)) {
GST_OBJECT_UNLOCK (mimenc);
GST_ERROR_OBJECT (mimenc, "Element has no clock");
gst_pad_pause_task (mimenc->srcpad);
return;
}
GST_OBJECT_LOCK (mimenc);
if (mimenc->stop_paused_mode) {
GST_OBJECT_UNLOCK (mimenc);
goto stop_task;