Commit 38f040d12d for ffmpeg
commit 38f040d12d2b7f1f3cca2ab7c31296b002588b79
Author: James Almer <jamrial@gmail.com>
Date: Mon Nov 2 10:32:27 2026 -0300
avformat/av1dec: increase score for OBU and retry probing as long as more data can be fed
With the recent addition of the raw LCEVC demuxer, probing for OBU samples that
include a Metadata OBU with an LCEVC payload, if said payload was of
considerable size and present before a Frame Header, would result in the LCEVC
probing function returning success before OBU could even reach a point in the
bitstream where it may return a score.
Signed-off-by: James Almer <jamrial@gmail.com>
diff --git a/libavformat/av1dec.c b/libavformat/av1dec.c
index 0a81db4ef0..4f46ace4b1 100644
--- a/libavformat/av1dec.c
+++ b/libavformat/av1dec.c
@@ -48,7 +48,7 @@ static int get_score(int type, int *seq)
return -1;
case AV1_OBU_FRAME:
case AV1_OBU_FRAME_HEADER:
- return *seq ? AVPROBE_SCORE_EXTENSION + 1 : 0;
+ return *seq ? AVPROBE_SCORE_EXTENSION + 2 : 0;
case AV1_OBU_METADATA:
case AV1_OBU_PADDING:
return -1;
@@ -368,6 +368,8 @@ static int obu_probe(const AVProbeData *p)
ret = get_score(type, &seq);
if (ret >= 0)
return ret;
+ if (p->buf_size == cnt)
+ return AVERROR(EAGAIN);
}
return 0;
}