[FFmpeg-devel] [PATCH] avcodec/mjpeg_parser: skip markers after EOI, not by size

Michael Niedermayer michael at niedermayer.cc
Sat Nov 27 19:18:26 EET 2021


On Thu, Nov 25, 2021 at 02:30:33PM -0500, Alex Xu (Hello71) wrote:
> The check for m->size >= 0xF000 is intended to avoid skipping too much
> garbage data between JPEG frames in test_roman (thus missing next SOI),
> but it erroneously also skips valid markers between SOI and SOS. Instead
> of this, we should simply skip parsing markers other than SOI after EOI.
> That way, we will not accidentally skip over SOI due to some garbage
> between frames. There is still a small risk of encountering FFD8 in the
> garbage data, but the chance of this is fairly low.
> 
> Fixes: https://trac.ffmpeg.org/ticket/8967
> ---
>  libavcodec/mjpeg_parser.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

will apply

thx


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20211127/1cf23306/attachment.sig>


More information about the ffmpeg-devel mailing list