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:
parent
989361405e
commit
1d1b218d97
1 changed files with 4 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue