Skip to content

screencast: Discard pending buffer and fence if stream state changes

Arjen Hiemstra requested to merge work/ahiemstra/screencastcrash into master

While the changes made earlier prevent enqueueing buffers when the stream is not in a streaming state, screencasting continued to crash. The reason for that seems to be that pipewire will, in certain cases, invalidate some buffers, including the buffer that we are currently tracking as "pending buffer". The result of this is that when we then try to enqueue that buffer, we get a crash.

To prevent this, discard the pending buffer when the stream state changes. Since that makes the pending fence useless as well, also discard it and its notifier.

Merge request reports