This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 5d20365bb4e6d459c5ab479f82c5ac342b0c3479
Author:     Niklas Haas <[email protected]>
AuthorDate: Sun Oct 4 14:36:51 2026 +0200
Commit:     James Almer <[email protected]>
CommitDate: Fri Oct 23 20:33:53 2026 +0000

    avformat/jpegmpfenc: skip marker padding bytes
    
    JPEG segments may be preceded by an arbitrary number of 0xFF bytes.
    We don't need a separate length check here because the bytestream2 API
    already returns 0 when the end of the segment is reached prematurely, which
    would fail the following length check.
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libavformat/jpegmpfenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/jpegmpfenc.c b/libavformat/jpegmpfenc.c
index 5f9e8145dd..84c24aa584 100644
--- a/libavformat/jpegmpfenc.c
+++ b/libavformat/jpegmpfenc.c
@@ -264,6 +264,8 @@ static int mpf_write_packet(AVFormatContext *ctx, AVPacket 
*pkt)
         }
 
         int marker = bytestream2_get_byte(&gb);
+        while (marker == 0xFF) /* fill bytes */
+            marker = bytestream2_get_byte(&gb);
         if (marker == SOS || marker == TEM || (marker >= RST0 && marker <= 
EOI)) {
             if (!img->splice_pos)
                 img->splice_pos = pos;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to