[FFmpeg-cvslog] avcodec/h264dec: make slice header parse errors fatal under AV_EF_EXPLODE

Dale Curtis git at videolan.org
Mon Feb 3 05:40:12 EET 2025


ffmpeg | branch: master | Dale Curtis <dalecurtis at chromium.org> | Tue Jan  7 00:11:49 2025 +0000| [957eb2323a924aa0b148927889eae581185c367b] | committer: Marth64

avcodec/h264dec: make slice header parse errors fatal under AV_EF_EXPLODE

This fixes timeout issues and seems like it was intended
since the line emits an error log.

Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
Signed-off-by: Marth64 <marth64 at proxyid.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=957eb2323a924aa0b148927889eae581185c367b
---

 libavcodec/h264dec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 8feb5558aa..45ebe2656d 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -742,8 +742,10 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
                    nal->type, nal->size_bits);
         }
 
-        if (err < 0) {
+        if (err < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE)) {
             av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n");
+            ret = err;
+            goto end;
         }
     }
 



More information about the ffmpeg-cvslog mailing list