diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-10-20 14:25:02 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-10-20 14:25:02 +0000 |
commit | 72be7db4237e26b57b3d5474ae67c4b3b27c2fb2 (patch) | |
tree | 99408167a9f80d197a2ee919c9778a86b858b226 /libavformat/asf.c | |
parent | aa237f45354799cdc34bdb06759e560dab3a0532 (diff) | |
download | ffmpeg-72be7db4237e26b57b3d5474ae67c4b3b27c2fb2.tar.gz |
Add support for decrypting asf files
Originally committed as revision 10821 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 2809f07188..7b1ad67804 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -23,6 +23,7 @@ #include "mpegaudio.h" #include "asf.h" #include "common.h" +#include "asfcrypt.h" #undef NDEBUG #include <assert.h> @@ -823,6 +824,9 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt) get_buffer(pb, asf_st->pkt.data + asf->packet_frag_offset, asf->packet_frag_size); + if (s->key && s->keylen == 20) + ff_asfcrypt_dec(s->key, asf_st->pkt.data + asf->packet_frag_offset, + asf->packet_frag_size); asf_st->frag_offset += asf->packet_frag_size; /* test if whole packet is read */ if (asf_st->frag_offset == asf_st->pkt.size) { |