From 0acbdaa09d9a799be183e323ee988f39df9f4ecc Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 23 Aug 2017 16:42:30 +0200 Subject: [PATCH] iptv libav input: ignore the negative dts/pts values --- src/input/mpegts/iptv/iptv_libav.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 */ -- 2.47.3