[FFmpeg-devel] [PATCH] libavcodec/hdrdec: accept "#?RGBE" header in addition to "#?RADIANCE"
Kirill Gavrilov
gavr.mail at gmail.com
Fri Jan 17 17:11:04 EET 2025
Some Radiance HDR image files in the wild have "#?RGBE" header,
which other image readers accept.
Signed-off-by: Kirill Gavrilov <kirill at sview.ru>
---
libavcodec/hdrdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/hdrdec.c b/libavcodec/hdrdec.c
index b7ade48e32..6e62e19dcd 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.25.1
More information about the ffmpeg-devel
mailing list