Browse Source

Only process scrambled content in decode_packet()

When trying to run decke/drmdecrypt it did not work as expected.
After comparing the output of https://github.com/IvoNet/drmdecrypt
with decke's version a check for scrambled content was missing.

Originally this check is from:
https://github.com/marvin0815/drmdecrypt

Now decke's version is fast AND works :-)

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
tags/v1.1
Oliver Hartkopp 4 years ago
parent
commit
1a91643d2f
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      drmdecrypt.c

+ 5
- 1
drmdecrypt.c View File

@@ -235,7 +235,11 @@ int decode_packet(unsigned char *data, unsigned char *outdata)
235 235
    }
236 236
 
237 237
    memcpy(outdata, data, 188);
238
-   
238
+
239
+   /* only process scrambled content */
240
+   if(((data[3] & 0xC0) != 0xC0) && ((data[3] & 0xC0) != 0x80))
241
+     return 0;
242
+
239 243
    trace(TRC_DEBUG, "-------------------");
240 244
    trace(TRC_DEBUG, "Trans. Error Indicator: 0x%x", data[2] & 0x80);
241 245
    trace(TRC_DEBUG, "Payload Unit start Ind: 0x%x", data[2] & 0x40);

Loading…
Cancel
Save