diff --git a/src/iptv_input.c b/src/iptv_input.c index 2f65398..c72a3c4 100644 --- a/src/iptv_input.c +++ b/src/iptv_input.c @@ -96,7 +96,7 @@ iptv_got_pmt(const uint8_t *ptr, size_t len, void *aux) * Handle a single TS packet for the given IPTV service */ static void -iptv_ts_input(service_t *t, const uint8_t *tsb) +iptv_ts_input(service_t *t, uint8_t *tsb) { uint16_t pid = ((tsb[1] & 0x1f) << 8) | tsb[2]; diff --git a/src/tsdemux.c b/src/tsdemux.c index dde8aab..899db98 100644 --- a/src/tsdemux.c +++ b/src/tsdemux.c @@ -181,7 +181,7 @@ ts_extract_pcr(service_t *t, elementary_stream_t *st, const uint8_t *tsb, * Process service stream packets, extract PCR and optionally descramble */ void -ts_recv_packet1(service_t *t, const uint8_t *tsb, int64_t *pcrp) +ts_recv_packet1(service_t *t, uint8_t *tsb, int64_t *pcrp) { elementary_stream_t *st; int pid, n, m, r; @@ -248,7 +248,9 @@ ts_recv_packet1(service_t *t, const uint8_t *tsb, int64_t *pcrp) if(!error) { if(n == 0) { - service_set_streaming_status_flags(t, TSS_NO_DESCRAMBLER); + //service_set_streaming_status_flags(t, TSS_NO_DESCRAMBLER); + tsb[3] &= 0x3f; + ts_recv_packet0(t, st, tsb); } else if(m == n) { service_set_streaming_status_flags(t, TSS_NO_ACCESS); } diff --git a/src/tsdemux.h b/src/tsdemux.h index 61e088f..245cf99 100644 --- a/src/tsdemux.h +++ b/src/tsdemux.h @@ -21,7 +21,7 @@ int ts_resync ( const uint8_t *tsb, int *len, int *idx ); -void ts_recv_packet1(struct service *t, const uint8_t *tsb, int64_t *pcrp); +void ts_recv_packet1(struct service *t, uint8_t *tsb, int64_t *pcrp); void ts_recv_packet2(struct service *t, const uint8_t *tsb);