This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 510dbddd52 avcodec/h264_parse: return SPS/PPS errors from avcC with
explode
510dbddd52 is described below
commit 510dbddd523dd8aca25fdfe2d5e01803f4145bf1
Author: Martin Mirchev <[email protected]>
AuthorDate: Wed Oct 21 18:24:34 2026 +0800
Commit: James Almer <[email protected]>
CommitDate: Wed Oct 21 14:52:52 2026 +0000
avcodec/h264_parse: return SPS/PPS errors from avcC with explode
decode_extradata_ps_mp4() skips the retry with an escaped NAL when
AV_EF_EXPLODE is set, but then returns 0 regardless, so a parameter set
that fails to parse in avcC extradata is silently ignored exactly when
the caller asked for errors to be fatal. h264_decode_init() fails on
extradata errors only with explode, so avcodec_open2() succeeded with
-err_detect explode on avcC extradata with a broken SPS, and the
"Decoding sps %d from avcC failed" path was unreachable.
Return the error when explode is set.
Signed-off-by: Martin Mirchev <[email protected]>
---
libavcodec/h264_parse.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c
index c6f9b3cea7..80573ae251 100644
--- a/libavcodec/h264_parse.c
+++ b/libavcodec/h264_parse.c
@@ -424,7 +424,9 @@ static int decode_extradata_ps_mp4(const uint8_t *buf, int
buf_size, H264ParamSe
int ret;
ret = decode_extradata_ps(buf, buf_size, ps, 1, logctx);
- if (ret < 0 && !(err_recognition & AV_EF_EXPLODE)) {
+ if (ret < 0 && (err_recognition & AV_EF_EXPLODE))
+ return ret;
+ if (ret < 0) {
GetByteContext gbc;
PutByteContext pbc;
uint8_t *escaped_buf;
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]