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

Eran Kornblau eran.kornblau at kaltura.com
Tue Dec 15 10:16:11 CET 2015


> 
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libavutil-add-aes-ctr-support.patch
Type: application/octet-stream
Size: 8134 bytes
Desc: 0001-libavutil-add-aes-ctr-support.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151215/a3e25df8/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-movenc-support-cenc-common-encryption.patch
Type: application/octet-stream
Size: 26166 bytes
Desc: 0002-movenc-support-cenc-common-encryption.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151215/a3e25df8/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-mov-support-cenc-common-encryption.patch
Type: application/octet-stream
Size: 9081 bytes
Desc: 0003-mov-support-cenc-common-encryption.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151215/a3e25df8/attachment-0002.obj>


More information about the ffmpeg-devel mailing list