diff options
author | Philippe Normand <philn@igalia.com> | 2019-10-22 18:33:18 +0100 |
---|---|---|
committer | Philippe Normand <philn@igalia.com> | 2019-10-24 09:41:10 +0000 |
commit | b905501c55015d9ef14fe47b9a0b9eb8a51eefdd (patch) | |
tree | 418198167ce311fe8be206e3fdc39c057a4a2396 /ext/wpe/WPEThreadedView.cpp | |
parent | 0f03e33b03456d673550ad72d5dc14fc27ecbea3 (diff) | |
download | gstreamer-plugins-bad-b905501c55015d9ef14fe47b9a0b9eb8a51eefdd.tar.gz |
wpe: Get rid of un-necessary frameComplete dispatchs
frameComplete() should be called only if there's a new commited frame.
Diffstat (limited to 'ext/wpe/WPEThreadedView.cpp')
-rw-r--r-- | ext/wpe/WPEThreadedView.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/wpe/WPEThreadedView.cpp b/ext/wpe/WPEThreadedView.cpp index 4d6cafa01..1857b44a2 100644 --- a/ext/wpe/WPEThreadedView.cpp +++ b/ext/wpe/WPEThreadedView.cpp @@ -270,6 +270,7 @@ bool WPEThreadedView::initialize(GstWpeSrc* src, GstGLContext* context, GstGLDis GstEGLImage* WPEThreadedView::image() { GstEGLImage* ret = nullptr; + bool dispatchFrameComplete = false; { GMutexHolder lock(images.mutex); @@ -286,13 +287,14 @@ GstEGLImage* WPEThreadedView::image() if (previousImage) gst_egl_image_unref(previousImage); + dispatchFrameComplete = true; } if (images.committed) ret = images.committed; } - if (ret) + if (dispatchFrameComplete) frameComplete(); return ret; |