summaryrefslogtreecommitdiff
path: root/encode.c
diff options
context:
space:
mode:
authorMikhail Burakov <mburakov@mailbox.org>2023-03-18 18:17:05 +0100
committerMikhail Burakov <mburakov@mailbox.org>2023-03-18 18:17:05 +0100
commit85c81156a37e161ca08831b9ac9af022c72ebdea (patch)
tree03d89e6dee123445f42f14e51272f7bd493b0eeb /encode.c
parent05a8dd31625ce342e3255cb980d5fac0017e91da (diff)
Proper handling of clients closing their stdin
Diffstat (limited to 'encode.c')
-rw-r--r--encode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/encode.c b/encode.c
index ba38c6a..5c7e886 100644
--- a/encode.c
+++ b/encode.c
@@ -206,6 +206,7 @@ static bool DrainPacket(const struct AVPacket* packet, int fd) {
switch (result) {
case -1:
if (errno == EINTR) continue;
+ if (errno == EPIPE) return true;
LOG("Failed to write packed (%s)", strerror(errno));
return false;
case 0: