summaryrefslogtreecommitdiff
path: root/apps/metadata/asf.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/metadata/asf.c')
-rw-r--r--apps/metadata/asf.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/metadata/asf.c b/apps/metadata/asf.c
index 65c99f4b07..c938cc6d0e 100644
--- a/apps/metadata/asf.c
+++ b/apps/metadata/asf.c
@@ -58,7 +58,8 @@ enum asf_error_e {
58 ASF_ERROR_INVALID_OBJECT = -7, /* ASF object missing or in wrong place */ 58 ASF_ERROR_INVALID_OBJECT = -7, /* ASF object missing or in wrong place */
59 ASF_ERROR_OBJECT_SIZE = -8, /* invalid ASF object size (too small) */ 59 ASF_ERROR_OBJECT_SIZE = -8, /* invalid ASF object size (too small) */
60 ASF_ERROR_SEEKABLE = -9, /* file not seekable */ 60 ASF_ERROR_SEEKABLE = -9, /* file not seekable */
61 ASF_ERROR_SEEK = -10 /* file is seekable but seeking failed */ 61 ASF_ERROR_SEEK = -10, /* file is seekable but seeking failed */
62 ASF_ERROR_ENCRYPTED = -11 /* file is encrypted */
62}; 63};
63 64
64static const guid_t asf_guid_null = 65static const guid_t asf_guid_null =
@@ -89,6 +90,12 @@ static const guid_t asf_guid_content_description =
89static const guid_t asf_guid_extended_content_description = 90static const guid_t asf_guid_extended_content_description =
90{0xD2D0A440, 0xE307, 0x11D2, {0x97, 0xF0, 0x00, 0xA0, 0xC9, 0x5E, 0xA8, 0x50}}; 91{0xD2D0A440, 0xE307, 0x11D2, {0x97, 0xF0, 0x00, 0xA0, 0xC9, 0x5E, 0xA8, 0x50}};
91 92
93static const guid_t asf_guid_content_encryption =
94{0x2211b3fb, 0xbd23, 0x11d2, {0xb4, 0xb7, 0x00, 0xa0, 0xc9, 0x55, 0xfc, 0x6e}};
95
96static const guid_t asf_guid_extended_content_encryption =
97{0x298ae614, 0x2622, 0x4c17, {0xb9, 0x35, 0xda, 0xe0, 0x7e, 0xe9, 0x28, 0x9c}};
98
92/* stream type guids */ 99/* stream type guids */
93 100
94static const guid_t asf_guid_stream_type_audio = 101static const guid_t asf_guid_stream_type_audio =
@@ -462,6 +469,10 @@ static int asf_parse_header(int fd, struct mp3entry* id3,
462 } 469 }
463 470
464 lseek(fd, bytesleft, SEEK_CUR); 471 lseek(fd, bytesleft, SEEK_CUR);
472 } else if (asf_guid_match(&current.guid, &asf_guid_content_encryption)
473 || asf_guid_match(&current.guid, &asf_guid_extended_content_encryption)) {
474 //DEBUGF("File is encrypted\n");
475 return ASF_ERROR_ENCRYPTED;
465 } else { 476 } else {
466 //DEBUGF("Skipping %d bytes of object\n",(int)(current.size - 24)); 477 //DEBUGF("Skipping %d bytes of object\n",(int)(current.size - 24));
467 lseek(fd,current.size - 24,SEEK_CUR); 478 lseek(fd,current.size - 24,SEEK_CUR);