--- src/input/mpegts/tsdemux.c.orig 2016-07-20 12:33:33.381777694 -0400 +++ src/input/mpegts/tsdemux.c 2016-07-26 10:01:33.607231569 -0400 @@ -80,6 +80,14 @@ if (!error) errors++; error |= 2; + + // R. Pavlik + // Skip packet and return so it does not corupt time offset + // for timeshift + st->es_cc = (cc + 1) & 0xf; + ts_skip(t,tsb,len); + return; + } st->es_cc = (cc + 1) & 0xf; } @@ -244,7 +252,16 @@ } } else { - ts_recv_packet0(t, st, tsb, len); + //ts_recv_packet0(t, st, tsb, len); + + // R. Pavlik + // If we had an errot, skip packet and return so it does not corrupt + // time offset for timeshift + if(error){ + ts_skip(t,tsb,len); + } else { + ts_recv_packet0(t, st, tsb, len); + } } pthread_mutex_unlock(&t->s_stream_mutex); return 1;