Browse Source

Do not output anything when there is no valid decryption key.

When the decryption fails due to missing decryption key it is better
to not output anything. Before this patch in case of missing decryption
key the PSI tables were still being written to the output and this
could confuse some monitoring systems to think that the stream is
working.
Georgi Chorbadzhiyski 12 years ago
parent
commit
87fb8df658
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      process.c

+ 2
- 0
process.c View File

@@ -244,6 +244,8 @@ void *decode_thread(void *_ts) {
244 244
 static inline void output_write(struct ts *ts, uint8_t *data, unsigned int data_size) {
245 245
 	if (!data)
246 246
 		return;
247
+	if (!ts->camd.key->is_valid_cw)
248
+		return;
247 249
 	if (!ts->rtp_output) {
248 250
 		write(ts->output.fd, data, data_size);
249 251
 	} else {

Loading…
Cancel
Save