avformat/jpegxl: remove jpegxl_probe, instead call avcodec/jpegxl_parse

This prevents code duplication in the source form by calling the parse
code that was moved to avcodec last commit. The code will be duplicated
in binary form for shared builds (it's not that large), but for source
code it will only exist in one location now.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
This commit is contained in:
Leo Izen
2023-07-10 18:07:09 -04:00
parent 0c0dd23fe1
commit e8a63b4763
6 changed files with 41 additions and 536 deletions

View File

@@ -36,7 +36,7 @@
#include "avio_internal.h"
#include "internal.h"
#include "img2.h"
#include "jpegxl_probe.h"
#include "libavcodec/jpegxl_parse.h"
#include "libavcodec/mjpeg.h"
#include "libavcodec/vbn.h"
#include "libavcodec/xwd.h"
@@ -850,7 +850,7 @@ static int jpegxl_probe(const AVProbeData *p)
if (AV_RL16(b) != FF_JPEGXL_CODESTREAM_SIGNATURE_LE)
return 0;
#if CONFIG_IMAGE_JPEGXL_PIPE_DEMUXER
if (ff_jpegxl_verify_codestream_header(p->buf, p->buf_size, 1) >= 0)
if (ff_jpegxl_parse_codestream_header(p->buf, p->buf_size, NULL, 5) >= 0)
return AVPROBE_SCORE_MAX - 2;
#endif
return 0;