Skip to content

Commit

Permalink
Try to fix a problem when stream goes from no program to properly dec…
Browse files Browse the repository at this point in the history
…rypted

Without this fix "CODE_WORD_OK" message was not sent.
  • Loading branch information
Georgi Chorbadzhiyski committed Jan 18, 2017
1 parent 2c1a032 commit 8984be4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tsdecrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,10 +926,12 @@ static void do_reports(struct ts *ts) {
ts_LOGf("CLR | No encrypted packets in the last %ld seconds. Stream is clear.\n", now - ts->last_scrambled_packet_ts);
notify(ts, "STREAM_CLEAR", "No encrypted packets in the last %ld seconds. Stream is clear.", now - ts->last_scrambled_packet_ts);
ts->last_not_scrambled_report_ts = now;
}
if (ts->process_ecm && !ts->key.is_valid_cw) {
if (ts->cw_warn_sec && now >= ts->cw_next_warn) {
report_cw_warn(ts, now);
ts->key.is_valid_cw = 0;
} else {
if (ts->process_ecm && !ts->key.is_valid_cw) {
if (ts->cw_warn_sec && now >= ts->cw_next_warn) {
report_cw_warn(ts, now);
}
}
}
if (!ts->no_input) {
Expand All @@ -938,6 +940,7 @@ static void do_reports(struct ts *ts) {
ts_LOGf("MIS | There is no valid PMT in the input.\n");
notify(ts, "NO_PROGRAM", "The input is missing valid program.");
ts->have_valid_pmt = 0;
ts->key.is_valid_cw = 0;
}
}
}
Expand Down

0 comments on commit 8984be4

Please sign in to comment.