On 31/01/2023 12:37, "zhilizhao(赵志立)" wrote:
+        /* extradata may or may not be null terminated; in the case where
+         * it is, avoid copying a null into the middle of the buffer */
+        while (header_size > 0 && par->extradata[header_size - 1] == '\0')
+            header_size--;
+
The comment is misleading. extradata is always null terminated, although
those paddings don’t count in extradata_size.

That's a bit pedantic, but I take your point. "The contents of extradata may or may..." would be better. Following some discussion on IRC, I've actually submitted another patch that solves the problem in a different way, but I don't think anyone has looked at it yet...

http://ffmpeg.org/pipermail/ffmpeg-devel/2023-January/306017.html
_______________________________________________
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".

Reply via email to