[FFmpeg-devel] support for reading / writing encrypted MP4 files
eran.kornblau at kaltura.com
Sun Dec 6 16:42:34 CET 2015
Sorry for spamming, ran some more tests and found a bug in my patch, updated patch file attached.
The bug was that in case subsample encryption was enabled (the default for AVC) the subsample size
reported in the 'saiz' atom was wrong - it did not include the size of the IV.
I originally tested my change by decrypting the file using MP4Box, and playing it, I guess MP4Box
doesn't care about this discrepancy...
In case anyone started reviewing the patch, the fix is in mov_cenc_end_packet, the lines:
ctx->auxiliary_info_size - ctx->auxiliary_info_subsample_start;
were changed to:
AES_CTR_IV_SIZE + ctx->auxiliary_info_size - ctx->auxiliary_info_subsample_start;
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 33056 bytes
More information about the ffmpeg-devel