PR #22932 opened by Kirill Gavrilov Tartynskih (gkv311) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22932 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22932.patch
Some Radiance HDR image files in the wild have "#?RGBE" header, which other image readers accept. >From 0e4956631d47db92e35df1151759ed8b333b77fc Mon Sep 17 00:00:00 2001 From: Kirill Gavrilov <[email protected]> Date: Fri, 24 Jan 2025 20:28:11 +0300 Subject: [PATCH] libavcodec/hdrdec: accept "#?RGBE" header in addition to "#?RADIANCE" Some Radiance HDR image files in the wild have "#?RGBE" header, which other image readers accept. --- libavcodec/hdrdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hdrdec.c b/libavcodec/hdrdec.c index cffa7570db..3f434019ea 100644 --- a/libavcodec/hdrdec.c +++ b/libavcodec/hdrdec.c @@ -98,7 +98,7 @@ static int hdr_decode_frame(AVCodecContext *avctx, AVFrame *p, bytestream2_init(&gb, avpkt->data, avpkt->size); hdr_get_line(&gb, line, sizeof(line)); - if (memcmp("#?RADIANCE\n", line, 11)) + if (memcmp("#?RADIANCE\n", line, 11) && memcmp("#?RGBE\n", line, 7)) return AVERROR_INVALIDDATA; do { -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
