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 afc8556a6a avcodec/cuviddec: handle 4-byte AV1CodecConfigurationRecord
afc8556a6a is described below

commit afc8556a6a7166166e7d8aa532950b98422c6ed1
Author:     Diego de Souza <[email protected]>
AuthorDate: Tue Apr 21 15:34:13 2026 +0200
Commit:     James Almer <[email protected]>
CommitDate: Tue Apr 21 14:03:58 2026 +0000

    avcodec/cuviddec: handle 4-byte AV1CodecConfigurationRecord
    
    AV1CodecConfigurationRecord may contain only the 4-byte header and no
    configOBUs. Still skip the header in that case so only configOBUs are
    passed to cuvidParseVideoData().
    
    Otherwise the av1C header itself is treated as sequence header data
    and AV1 decoding can fail with an unknown error.
    
    Suggested-by: Aniket Dhok <[email protected]>
    Signed-off-by: Diego de Souza <[email protected]>
---
 libavcodec/cuviddec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c
index be183fce35..fa1494cad4 100644
--- a/libavcodec/cuviddec.c
+++ b/libavcodec/cuviddec.c
@@ -1103,7 +1103,7 @@ static av_cold int cuvid_decode_init(AVCodecContext 
*avctx)
     // Skip first 4 bytes of AV1CodecConfigurationRecord to keep configOBUs
     // only, otherwise cuvidParseVideoData report unknown error.
     if (avctx->codec->id == AV_CODEC_ID_AV1 &&
-            extradata_size > 4 &&
+            extradata_size >= 4 &&
             extradata[0] & 0x80) {
         extradata += 4;
         extradata_size -= 4;

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

Reply via email to