On 09.06.2023 04:47, "zhilizhao(赵志立)" wrote:
It’s a quick fix, but I’m afraid the two tickets are caused by more deep pitfalls. It would be helpful if someone can provide a sample for test.
I've uploaded a sample called bear-640x360-v_frag-cenc-senc.mp4. You can play it with -decryption_key ebdd62f16814d27b68ef122afce4ae3c.
The code path is only taken for fragmented encrypted MP4 files. I was not able to use ffmpeg to produce a file that exhibits the same behavior.
The mov_try_read_block function will be called with a size of 82 in this case. It's a very short sample, but for longer content this will be done every few seconds, whenever a new fragment starts. The encryption info is only freed when the format context is closed. That's not an inherent problem imo, but it does quickly escalate if you allocate a megabyte each time only to store a couple bytes.
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".