From a534bae4cae7e4975b2e3afd644db808830b9ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Sat, 26 Sep 2009 08:17:55 +0000 Subject: [PATCH] Only force descrambling if at least on scrambled packet is seen --- src/tsdemux.c | 4 +++- src/tvhead.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tsdemux.c b/src/tsdemux.c index 9bd68c56..0812f192 100644 --- a/src/tsdemux.c +++ b/src/tsdemux.c @@ -210,9 +210,11 @@ ts_recv_packet1(th_transport_t *t, uint8_t *tsb) if((tsb[3] & 0xc0) || - (t->tht_scrambled && st->st_type != SCT_CA && + (t->tht_scrambled_seen && st->st_type != SCT_CA && st->st_type != SCT_PAT && st->st_type != SCT_PMT)) { + t->tht_scrambled_seen = 1; + /* scrambled stream */ n = m = 0; diff --git a/src/tvhead.h b/src/tvhead.h index e6a4bc10..ac96e8d4 100644 --- a/src/tvhead.h +++ b/src/tvhead.h @@ -609,6 +609,7 @@ typedef struct th_transport { struct th_descrambler_list tht_descramblers; int tht_scrambled; + int tht_scrambled_seen; int tht_caid; /**