Mercurial > libavformat.hg
diff asfdec.c @ 5273:f292b3e34823 libavformat
Detect Windows Media DRM protected files and display warning if no key
was provided.
Patch by Daniel G. Taylor, dan programmer-art org
author | cehoyos |
---|---|
date | Sun, 11 Oct 2009 23:09:33 +0000 |
parents | 3fe89226cacf |
children | 4211f91f69b1 |
line wrap: on
line diff
--- a/asfdec.c Sun Oct 11 11:56:53 2009 +0000 +++ b/asfdec.c Sun Oct 11 23:09:33 2009 +0000 @@ -532,6 +532,15 @@ } 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"); + } 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)) { + av_log(s, AV_LOG_WARNING, "Digital signature detected, decoding will likely fail!\n"); + } + } url_fseek(pb, gsize - 24, SEEK_CUR); } }