[FFmpeg-devel] [PATCH] avformat/img2dec: probe JFIF/Exif header

Michael Niedermayer michael at niedermayer.cc
Sat Nov 27 19:21:55 EET 2021


On Thu, Nov 25, 2021 at 02:36:46PM -0500, Alex Xu (Hello71) wrote:
> Due to reasons, mpv doesn't pass filename when probing. mpv also sets
> default probescore threshold to 26. Since the current jpeg_probe
> implementation returns 25 until EOI, it means that the whole image needs
> to be probed to succeed. Worse, the whole image is not passed at once;
> increasingly large buffers are tried before that. Adding it up together,
> if many demuxers are enabled, moderately large JPEG files (few MB) can
> take several seconds to open, despite taking less than 1 second to
> actually decode.
> 
> Therefore, adjust the heuristic to be more optimistic if proper JFIF or
> Exif segments are found. While not strictly required, the vast majority
> of JPEG-ish files have one or the other or both.
> ---
>  libavformat/img2dec.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

will apply

thx

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

If the United States is serious about tackling the national security threats 
related to an insecure 5G network, it needs to rethink the extent to which it
values corporate profits and government espionage over security.-Bruce Schneier
-------------- 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/80af43c2/attachment.sig>


More information about the ffmpeg-devel mailing list