Hi, 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_sizes[ctx->auxiliary_info_entries] = ctx->auxiliary_info_size - ctx->auxiliary_info_subsample_start; were changed to: ctx->auxiliary_info_sizes[ctx->auxiliary_info_entries] = AES_CTR_IV_SIZE + ctx->auxiliary_info_size - ctx->auxiliary_info_subsample_start; Thanks Eran
0001-movenc-support-cenc-common-encryption.patch
Description: 0001-movenc-support-cenc-common-encryption.patch
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel