From: Jaroslav Kysela Date: Wed, 23 Aug 2017 14:42:30 +0000 (+0200) Subject: iptv libav input: ignore the negative dts/pts values X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0acbdaa09d9a799be183e323ee988f39df9f4ecc;p=thirdparty%2Ftvheadend.git iptv libav input: ignore the negative dts/pts values --- diff --git a/src/input/mpegts/iptv/iptv_libav.c b/src/input/mpegts/iptv/iptv_libav.c index e9abcf335..58b7cca65 100644 --- a/src/input/mpegts/iptv/iptv_libav.c +++ b/src/input/mpegts/iptv/iptv_libav.c @@ -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 */