Return buffer to pipewire when returning early from recordFrame

Authored by cblack on Apr 9 2020, 11:04 PM.

Description

Return buffer to pipewire when returning early from recordFrame

Summary: Even when something goes wrong, the buffer should be returned to pipewire for recycling on next frame.

Test Plan:
Before: when something goes wrong when screencasting, first errors are the actual issue and subsequent errors are due to pipewire not having any buffers for the pw_stream_deque_buffer call
After: when something goes wrong when screencasting, errors are always the actual issue

Reviewers: Plasma, jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D28713