[FFmpeg-devel] support for reading / writing encrypted MP4 files

Michael Niedermayer michaelni at gmx.at
Tue Dec 15 15:35:40 CET 2015


On Tue, Dec 15, 2015 at 09:16:11AM +0000, Eran Kornblau wrote:
> > 
> > using a random IV value would break any regression tests
> > see AVFMT_FLAG_BITEXACT
> > 
> Fixed, only generating a random IV when bitexact is not enabled.
> Updated patch files attached.
> 
> > 
> > is this filling in a random IV that later is overridden ?
> > random_seed() can be slow so it would be better not to call it if
> > its value isnt used
> > 
> I didn't think it's too significant since it happens only once per decrypted track, but anyway, fixed it as well.
> I changed av_aes_ctr_init so that it will initialize an empty IV, and exposed av_aes_ctr_set_random_iv.
> This later function is called only by the encoder (and only when bitexact is disabled).
> 
> > -- 
> > Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Thanks !
> 
> Eran

>  Makefile  |    2 
>  aes_ctr.c |  129 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  aes_ctr.h |   83 +++++++++++++++++++++++++++++++++++++++
>  version.h |    2 
>  4 files changed, 215 insertions(+), 1 deletion(-)
> 1704fc6a8cfb2922b3806a1d1e122b668f743408  0001-libavutil-add-aes-ctr-support.patch
> From 8e6bc361924b6942b879b833c419bb7ea03b516f Mon Sep 17 00:00:00 2001
> From: erankor <eran.kornblau at kaltura.com>
> Date: Mon, 7 Dec 2015 11:58:41 +0200
> Subject: [PATCH 1/3] libavutil: add aes-ctr support

patch 1 and 2 applied

if you want to maintain the code in the future then please send a
patch that adds you to the maintainers file

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151215/ca3ceed8/attachment.sig>


More information about the ffmpeg-devel mailing list