mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
avformat/jpegxl_probe: Forward error codes
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 09621fd7d93a12974e9664b2aebb8237e5c46f03) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
63270289a0
commit
79af71223d
@ -261,8 +261,8 @@ int ff_jpegxl_verify_codestream_header(const uint8_t *buf, int buflen)
|
|||||||
if (get_bits_long(gb, 16) != FF_JPEGXL_CODESTREAM_SIGNATURE_LE)
|
if (get_bits_long(gb, 16) != FF_JPEGXL_CODESTREAM_SIGNATURE_LE)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (jpegxl_read_size_header(gb) < 0)
|
if ((ret = jpegxl_read_size_header(gb)) < 0)
|
||||||
return -1;
|
return ret;
|
||||||
|
|
||||||
all_default = get_bits1(gb);
|
all_default = get_bits1(gb);
|
||||||
if (!all_default)
|
if (!all_default)
|
||||||
@ -281,8 +281,9 @@ int ff_jpegxl_verify_codestream_header(const uint8_t *buf, int buflen)
|
|||||||
|
|
||||||
/* preview header */
|
/* preview header */
|
||||||
if (get_bits1(gb)) {
|
if (get_bits1(gb)) {
|
||||||
if (jpegxl_read_preview_header(gb) < 0)
|
ret = jpegxl_read_preview_header(gb);
|
||||||
return -1;
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* animation header */
|
/* animation header */
|
||||||
@ -307,8 +308,9 @@ int ff_jpegxl_verify_codestream_header(const uint8_t *buf, int buflen)
|
|||||||
if (num_extra_channels > 4)
|
if (num_extra_channels > 4)
|
||||||
return -1;
|
return -1;
|
||||||
for (uint32_t i = 0; i < num_extra_channels; i++) {
|
for (uint32_t i = 0; i < num_extra_channels; i++) {
|
||||||
if (jpegxl_read_extra_channel_info(gb) < 0)
|
ret = jpegxl_read_extra_channel_info(gb);
|
||||||
return -1;
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
if (get_bits_left(gb) < 1)
|
if (get_bits_left(gb) < 1)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user