screencast: better solution for missing context on cursor move

There's no need to use tryEnqueue if we only update the cursor
This commit is contained in:
Xaver Hugl 2022-03-16 17:49:10 +01:00
parent 989361405e
commit 1d1b218d97

View file

@ -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)