Unref v4l2 AVPacket even if writing failed.
Unref frame immediately once encoded. Fixes #2279 <https://github.com/Genymobile/scrcpy/pull/2279>
It allows to send the video stream to /dev/videoN, so that it can be captured (like a webcam) by any v4l2-capable tool. PR #2232 <https://github.com/Genymobile/scrcpy/pull/2232> PR #2233 <https://github.com/Genymobile/scrcpy/pull/2233> PR #2268 <https://github.com/Genymobile/scrcpy/pull/2268> Co-authored-by: Romain Vimont <rom@rom1v.com>