From 88fddda7e115447583262165cf0165c1a1d23f13 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Thu, 22 Aug 2013 22:04:23 +0100 Subject: [PATCH] mpegts: ensure that partial (TS packet) reads are properly handled --- src/input/mpegts/iptv/iptv.c | 1 + src/input/mpegts/linuxdvb/linuxdvb_frontend.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/mpegts/iptv/iptv.c b/src/input/mpegts/iptv/iptv.c index fa7da890..2b339e97 100644 --- a/src/input/mpegts/iptv/iptv.c +++ b/src/input/mpegts/iptv/iptv.c @@ -398,6 +398,7 @@ iptv_input_thread ( void *aux ) // TODO: close and remove? continue; } + r += pos; pthread_mutex_lock(&iptv_lock); diff --git a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c index 2110f8ff..dcc1bd50 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c @@ -640,7 +640,7 @@ linuxdvb_frontend_input_thread ( void *aux ) } /* Process */ - pos = mpegts_input_recv_packets((mpegts_input_t*)lfe, mmi, tsb, c, + pos = mpegts_input_recv_packets((mpegts_input_t*)lfe, mmi, tsb, c+pos, NULL, NULL, buf); }