Changeset 219681 in webkit
- Timestamp:
- Jul 20, 2017 6:07:01 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r219678 r219681 1 2017-07-20 Miguel Gomez <magomez@igalia.com> 2 3 [GStreamer] Some layout tests issue "g_mutex_clear() called on uninitialised or locked mutex" and flaky crash in ~MediaPlayerPrivateGStreamerBase 4 https://bugs.webkit.org/show_bug.cgi?id=173952 5 6 Reviewed by Carlos Garcia Campos. 7 8 Adjust MediaPlayerPrivateGStreamerBase to avoid concurrence problems with the GStreamer thread when 9 destroying the object. 10 11 Covered by existent tests. 12 13 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: 14 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): 15 (WebCore::MediaPlayerPrivateGStreamerBase::repaint): 16 (WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint): 17 1 18 2017-07-19 Zan Dobersek <zdobersek@igalia.com> 2 19 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r219391 r219681 240 240 m_notifier->invalidate(); 241 241 242 cancelRepaint();243 244 242 if (m_videoSink) { 245 243 g_signal_handlers_disconnect_matched(m_videoSink.get(), G_SIGNAL_MATCH_DATA, 0, 0, nullptr, nullptr, this); … … 252 250 } 253 251 254 g_mutex_clear(&m_sampleMutex);255 256 m_player = nullptr;257 258 252 if (m_volumeElement) 259 253 g_signal_handlers_disconnect_matched(m_volumeElement.get(), G_SIGNAL_MATCH_DATA, 0, 0, nullptr, nullptr, this); 260 254 255 // This will release the GStreamer thread from m_drawCondition if AC is disabled. 256 cancelRepaint(); 257 258 // The change to GST_STATE_NULL state is always synchronous. So after this gets executed we don't need to worry 259 // about handlers running in the GStreamer thread. 261 260 if (m_pipeline) 262 261 gst_element_set_state(m_pipeline.get(), GST_STATE_NULL); 262 263 g_mutex_clear(&m_sampleMutex); 264 265 m_player = nullptr; 263 266 } 264 267 … … 627 630 m_player->repaint(); 628 631 629 #if USE(GSTREAMER_GL) 630 bool shouldNotifyDraw = !m_renderingCanBeAccelerated; 631 #else 632 bool shouldNotifyDraw = true; 633 #endif 634 if (shouldNotifyDraw) { 635 LockHolder lock(m_drawMutex); 636 m_drawCondition.notifyOne(); 637 } 632 LockHolder lock(m_drawMutex); 633 m_drawCondition.notifyOne(); 638 634 } 639 635 … … 680 676 void MediaPlayerPrivateGStreamerBase::cancelRepaint() 681 677 { 682 #if USE(GSTREAMER_GL) 683 bool shouldCancelRepaint = !m_renderingCanBeAccelerated; 684 #else 685 bool shouldCancelRepaint = true; 686 #endif 687 if (shouldCancelRepaint) { 678 if (!m_renderingCanBeAccelerated) { 688 679 m_drawTimer.stop(); 689 680 LockHolder locker(m_drawMutex);
Note: See TracChangeset
for help on using the changeset viewer.