Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: asfdec.c
- ===================================================================
- --- asfdec.c (revision 25760)
- +++ asfdec.c (working copy)
- @@ -577,37 +577,44 @@
- get_str16_nolen(pb, name_len * 2, name, sizeof(name));
- ff_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name );
- }
- -#if 0
- - } else if (!guidcmp(&g, &ff_asf_codec_comment_header)) {
- - int len, v1, n, num;
- - char str[256], *q;
- - char tag[16];
- -
- - get_guid(pb, &g);
- - print_guid(&g);
- -
- - n = get_le32(pb);
- - for(i=0;i<n;i++) {
- - num = get_le16(pb); /* stream number */
- - get_str16(pb, str, sizeof(str));
- - get_str16(pb, str, sizeof(str));
- - len = get_le16(pb);
- - q = tag;
- - while (len > 0) {
- - v1 = get_byte(pb);
- - if ((q - tag) < sizeof(tag) - 1)
- - *q++ = v1;
- - len--;
- - }
- - *q = '\0';
- - }
- -#endif
- } else if (url_feof(pb)) {
- return -1;
- } else {
- if (!s->keylen) {
- if (!guidcmp(&g, &ff_asf_content_encryption)) {
- av_log(s, AV_LOG_WARNING, "DRM protected stream detected, decoding will likely fail!\n");
- + int i;
- + unsigned int len1, len2, len3, len4;
- + char drmkey[1024];
- + char license_url[1024];
- + memset(drmkey, 0, sizeof(char) * 1024);
- + memset(license_url, 0, sizeof(char) * 1024);
- + len1 = get_le32(pb);
- + url_fskip(pb, len1);
- +
- + /* skip "DRM" */
- + len2 = get_le32(pb);
- + assert(len2 == 4);
- + get_byte(pb);
- + get_byte(pb);
- + get_byte(pb);
- + get_byte(pb);
- +
- + /* drm key id */
- + len3 = get_le32(pb);
- + for(i = 0; i < len3; i++)
- + {
- + drmkey[i] = get_byte(pb);
- + }
- + av_log(NULL, AV_LOG_WARNING, "Key ID: %s\n", drmkey);
- +
- + /* license length */
- + len4 = get_le32(pb);
- + for(i = 0; i < len4; i++)
- + {
- + license_url[i] = get_byte(pb);
- + }
- + av_log(NULL, AV_LOG_WARNING, "License URL: %s\n", license_url);
- } else if (!guidcmp(&g, &ff_asf_ext_content_encryption)) {
- av_log(s, AV_LOG_WARNING, "Ext DRM protected stream detected, decoding will likely fail!\n");
- } else if (!guidcmp(&g, &ff_asf_digital_signature)) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement