From b83fa7f2a0467a5b42fa1c67b0a7e232d830e6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Sat, 19 Sep 2009 12:29:37 +0000 Subject: [PATCH] If a stream is scrambled, force packets through the descrambler even if that particular packet is not scrambled itself. Fixes out-of-order problems. --- src/tsdemux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tsdemux.c b/src/tsdemux.c index e6b01846..9bd68c56 100644 --- a/src/tsdemux.c +++ b/src/tsdemux.c @@ -209,7 +209,10 @@ ts_recv_packet1(th_transport_t *t, uint8_t *tsb) ts_extract_pcr(t, st, tsb); - if(tsb[3] & 0xc0) { + if((tsb[3] & 0xc0) || + (t->tht_scrambled && st->st_type != SCT_CA && + st->st_type != SCT_PAT && st->st_type != SCT_PMT)) { + /* scrambled stream */ n = m = 0;