PR #23161 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23161
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23161.patch

Fixes: assertion failure
Fixes: PR-009/bad_extra_idr_only.avi

Found-by: mosskappa
Signed-off-by: Michael Niedermayer <[email protected]>


>From b4194ba3b95eba685eda5c3140451327ff30aa7c Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Tue, 19 May 2026 21:16:27 +0200
Subject: [PATCH] avformat/avc: Adjust get_ue_golomb() to the maximum the
 implementation can handle

Fixes: assertion failure
Fixes: PR-009/bad_extra_idr_only.avi

Found-by: mosskappa
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/avc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/avc.c b/libavformat/avc.c
index e4040928cd..c7779686c6 100644
--- a/libavformat/avc.c
+++ b/libavformat/avc.c
@@ -194,7 +194,7 @@ static const AVRational avc_sample_aspect_ratio[17] = {
 
 static inline int get_ue_golomb(GetBitContext *gb) {
     int i;
-    for (i = 0; i < 32 && !get_bits1(gb); i++)
+    for (i = 0; i < 25 && !get_bits1(gb); i++)
         ;
     return get_bitsz(gb, i) + (1 << i) - 1;
 }
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to