mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
Merge pull request #26077 from vrabaud:avif_check
Disable strict mode when reading avif files
This commit is contained in:
commit
bacefd3b8d
@ -143,6 +143,7 @@ AvifDecoder::AvifDecoder() {
|
||||
m_buf_supported = true;
|
||||
channels_ = 0;
|
||||
decoder_ = avifDecoderCreate();
|
||||
decoder_->strictFlags = AVIF_STRICT_DISABLED;
|
||||
}
|
||||
|
||||
AvifDecoder::~AvifDecoder() {
|
||||
@ -166,6 +167,7 @@ bool AvifDecoder::checkSignature(const String &signature) const {
|
||||
std::unique_ptr<avifDecoder, decltype(&avifDecoderDestroy)> decoder(
|
||||
avifDecoderCreate(), avifDecoderDestroy);
|
||||
if (!decoder) return false;
|
||||
decoder->strictFlags = AVIF_STRICT_DISABLED;
|
||||
OPENCV_AVIF_CHECK_STATUS(
|
||||
avifDecoderSetIOMemory(
|
||||
decoder.get(), reinterpret_cast<const uint8_t *>(signature.c_str()),
|
||||
|
Loading…
Reference in New Issue
Block a user