Browse Source

tables: Filter special symbols in SDT.

Technically this is not right because the first char sets the
charset (eg 0x05 -> ISO-8859-5) but since tsdecrypt have no business
handling charsets just replace all special chars with asterisks.
Georgi Chorbadzhiyski 12 years ago
parent
commit
aee561cfd1
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      tables.c

+ 9
- 0
tables.c View File

@@ -228,6 +228,15 @@ void process_sdt(struct ts *ts, uint16_t pid, uint8_t *ts_packet) {
228 228
 			stream->descriptor_size, stream->descriptor_data,
229 229
 			&pname_len, &pname, &sname_len, &sname))
230 230
 		{
231
+			int r;
232
+			for (r = 0; r < pname_len; r++) {
233
+				if (pname[r] < ' ')
234
+					pname[r] = '*';
235
+			}
236
+			for (r = 0; r < sname_len; r++) {
237
+				if (sname[r] < ' ')
238
+					sname[r] = '*';
239
+			}
231 240
 			ts_LOGf("SDT | Service 0x%04x (%5d) Provider: \"%.*s\" Service: \"%.*s\"\n",
232 241
 				stream->service_id, stream->service_id,
233 242
 				pname_len, (char *)pname,

Loading…
Cancel
Save