]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
iptv: another way to fix the warning
authorJaroslav Kysela <perex@perex.cz>
Wed, 23 Aug 2017 10:41:22 +0000 (12:41 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 23 Aug 2017 10:41:22 +0000 (12:41 +0200)
src/input/mpegts/iptv/iptv_libav.c

index b8088ef3e7ffb30cbd5a6d25867a4e5e6733ab60..e9abcf335a987982b23be719d1d315ffa223eeef 100644 (file)
@@ -59,7 +59,7 @@ iptv_libav_write_packet(void *opaque, uint8_t *buf, int buf_size)
       }
       sbuf_append(&la->sbuf, buf, buf_size);
       /* notify iptv layer that we have new data to read */
-      (void)write(la->pipe.wr, "", 1);
+      if (write(la->pipe.wr, "", 1)) { };
     }
 fin:
     pthread_mutex_unlock(&la->lock);
@@ -221,7 +221,7 @@ iptv_libav_read ( iptv_mux_t *im )
   ret = la->sbuf.sb_ptr;
   sbuf_append_from_sbuf(&im->mm_iptv_buffer, &la->sbuf);
   sbuf_reset(&la->sbuf, WRITE_BUFFER_SIZE * 2);
-  (void)read(la->pipe.rd, buf, sizeof(buf));
+  if (read(la->pipe.rd, buf, sizeof(buf))) {};
   pthread_mutex_unlock(&la->lock);
   return ret;
 }