mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
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. Also updated hdr_probe() in libavformat/img2dec.
This commit is contained in:
committed by
Marton Balint
co-authored by
Marton Balint
parent
f69aa0cc64
commit
553321d59e
+1
-1
@@ -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 {
|
||||
|
||||
@@ -1064,7 +1064,7 @@ static int pam_probe(const AVProbeData *p)
|
||||
|
||||
static int hdr_probe(const AVProbeData *p)
|
||||
{
|
||||
if (!memcmp(p->buf, "#?RADIANCE\n", 11))
|
||||
if (!memcmp(p->buf, "#?RADIANCE\n", 11) || !memcmp(p->buf, "#?RGBE\n", 7))
|
||||
return AVPROBE_SCORE_MAX;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user