Mercurial > libavformat.hg
diff asf.c @ 2652:2d28b2a5b2e4 libavformat
Add support for decrypting asf files
author | reimar |
---|---|
date | Sat, 20 Oct 2007 14:25:02 +0000 |
parents | 4a3957734e85 |
children | 046577e618bd |
line wrap: on
line diff
--- a/asf.c Sat Oct 20 08:29:05 2007 +0000 +++ b/asf.c Sat Oct 20 14:25:02 2007 +0000 @@ -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 @@ 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) {