mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-02-09 07:54:28 +01:00
On socket disconnection, on Linux, recv() returns -1 and errno is set.
But on Windows, errno is 0.
In that case, AVERROR(errno) == 0, leading to the warning:
> Invalid return value 0 for stream protocol
To avoid the problem, if errno is 0, return AVERROR_EOF.
Ref: commit 2876463d39