]> uap-core.de Git - uwplayer.git/commitdiff
fix poll return check in player event loop
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Sun, 20 Feb 2022 09:49:37 +0000 (10:49 +0100)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Sun, 20 Feb 2022 09:49:37 +0000 (10:49 +0100)
application/player.c

index d9a88ce8142d3cced02feaba10364de727ea11a3..255f7cb30f5290397a7c337f3c3b1bcbb19bf370 100644 (file)
@@ -288,7 +288,7 @@ static void player_io(Player *p) {
     JSONParser *js = json_parser_new();
      
     char buf[PLAYER_IN_BUFSIZE];
-    while(p->isactive && poll(fds, 2, PLAYER_POLL_TIMEOUT)) {
+    while(p->isactive && (poll(fds, 2, PLAYER_POLL_TIMEOUT) >= 0)) {
         if(fds[0].revents == POLLIN) {
             ssize_t r;
             if((r = read(fds[0].fd, buf, PLAYER_IN_BUFSIZE)) <= 0) {