diff options
author | Daniel G. Taylor <dan@programmer-art.org> | 2009-10-11 23:09:33 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2009-10-11 23:09:33 +0000 |
commit | febd1c90a64c1df2d72600d0fe1f020e88d10953 (patch) | |
tree | 9a704faa90bf7b6c20c6d1b28d5b619b744d8967 /libavformat/asfdec.c | |
parent | 0115b3eadb16ff12ba9b10946c518c1471387093 (diff) | |
download | ffmpeg-febd1c90a64c1df2d72600d0fe1f020e88d10953.tar.gz |
Detect Windows Media DRM protected files and display warning if no key
was provided.
Patch by Daniel G. Taylor, dan programmer-art org
Originally committed as revision 20209 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r-- | libavformat/asfdec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 08f0d6586b..543faf29d4 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -532,6 +532,15 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) } 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); } } |