diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2021-11-25 14:36:46 -0500 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-11-27 18:24:49 +0100 |
commit | 6fdd7fe0b89f5f76314bf06a7d28fb18d0196f84 (patch) | |
tree | f3226b0233c98e3ec53fa7a393b71117c9d0e067 /libavformat/vapoursynth.c | |
parent | cd0bdce71ac0b9871fa04d31756daa26fa7999af (diff) | |
download | ffmpeg-6fdd7fe0b89f5f76314bf06a7d28fb18d0196f84.tar.gz |
avformat/img2dec: probe JFIF/Exif header
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.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/vapoursynth.c')
0 files changed, 0 insertions, 0 deletions