diff --git a/src/plugins/screencast/screencaststream.cpp b/src/plugins/screencast/screencaststream.cpp index a02c119bd8..aae80c24bc 100644 --- a/src/plugins/screencast/screencaststream.cpp +++ b/src/plugins/screencast/screencaststream.cpp @@ -500,18 +500,16 @@ void ScreenCastStream::recordCursor() return; } - struct pw_buffer *buffer = pw_stream_dequeue_buffer(pwStream); - - if (!buffer) { + m_pendingBuffer = pw_stream_dequeue_buffer(pwStream); + if (!m_pendingBuffer) { return; } - struct spa_buffer *spa_buffer = buffer->buffer; + struct spa_buffer *spa_buffer = m_pendingBuffer->buffer; spa_buffer->datas[0].chunk->size = 0; sendCursorData(Cursors::self()->currentCursor(), (spa_meta_cursor *) spa_buffer_find_meta_data (spa_buffer, SPA_META_Cursor, sizeof (spa_meta_cursor))); - - tryEnqueue(buffer); + enqueue(); } void ScreenCastStream::tryEnqueue(pw_buffer *buffer)