]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
iptv libav input: ignore the negative dts/pts values
authorJaroslav Kysela <perex@perex.cz>
Wed, 23 Aug 2017 14:42:30 +0000 (16:42 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 23 Aug 2017 14:42:41 +0000 (16:42 +0200)
src/input/mpegts/iptv/iptv_libav.c

index e9abcf335a987982b23be719d1d315ffa223eeef..58b7cca658780778456624dea9a5d17785173e3e 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 */
-      if (write(la->pipe.wr, "", 1)) { };
+      if (write(la->pipe.wr, "", 1)) {};
     }
 fin:
     pthread_mutex_unlock(&la->lock);
@@ -145,6 +145,9 @@ iptv_libav_thread(void *aux)
     }
     if (atomic_get(&la->running) == 0)
       goto unref;
+    if ((pkt.dts != AV_NOPTS_VALUE && pkt.dts < 0) ||
+        (pkt.pts != AV_NOPTS_VALUE && pkt.pts < 0))
+      goto unref;
     in_stream  = la->ictx->streams[pkt.stream_index];
     out_stream = la->octx->streams[pkt.stream_index];
     /* copy packet */