This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/5.1
in repository ffmpeg.

commit 387964c2160676d662f3165eb11714b98d2225c1
Author:     AdityaTeltia <[email protected]>
AuthorDate: Thu Apr 23 12:27:53 2026 +0530
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Tue May 5 15:21:15 2026 +0200

    avformat/hls_sample_encryption: add missing padding for audio setup buffer
    
    Fixes ticket #22890.
    
    The ff_hls_senc_parse_audio_setup_info function passes setup_data to
    parsers like avpriv_ac3_parse_header and init_get_bits8 which require
    the buffer to be padded with AV_INPUT_BUFFER_PADDING_SIZE bytes at the end.
    
    (cherry picked from commit 71d5fa8d4d3521856a8950226f639dbbab3c3d02)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/hls_sample_encryption.c | 1 +
 libavformat/hls_sample_encryption.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/hls_sample_encryption.c 
b/libavformat/hls_sample_encryption.c
index 089662905b..66e9822a2f 100644
--- a/libavformat/hls_sample_encryption.c
+++ b/libavformat/hls_sample_encryption.c
@@ -86,6 +86,7 @@ void ff_hls_senc_read_audio_setup_info(HLSAudioSetupInfo 
*info, const uint8_t *b
         return;
 
     memcpy(info->setup_data, buf, info->setup_data_length);
+    memset(info->setup_data + info->setup_data_length, 0, 
AV_INPUT_BUFFER_PADDING_SIZE);
 }
 
 int ff_hls_senc_parse_audio_setup_info(AVStream *st, HLSAudioSetupInfo *info)
diff --git a/libavformat/hls_sample_encryption.h 
b/libavformat/hls_sample_encryption.h
index e5a2eae01d..0f7e1c3ece 100644
--- a/libavformat/hls_sample_encryption.h
+++ b/libavformat/hls_sample_encryption.h
@@ -52,7 +52,7 @@ typedef struct HLSAudioSetupInfo {
     uint16_t            priming;
     uint8_t             version;
     uint8_t             setup_data_length;
-    uint8_t             setup_data[HLS_MAX_AUDIO_SETUP_DATA_LEN];
+    uint8_t             setup_data[HLS_MAX_AUDIO_SETUP_DATA_LEN + 
AV_INPUT_BUFFER_PADDING_SIZE];
 } HLSAudioSetupInfo;
 
 

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

Reply via email to