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 71d5fa8d4d avformat/hls_sample_encryption: add missing padding for 
audio setup buffer
71d5fa8d4d is described below

commit 71d5fa8d4d3521856a8950226f639dbbab3c3d02
Author:     AdityaTeltia <[email protected]>
AuthorDate: Thu Apr 23 12:27:53 2026 +0530
Commit:     AdityaTeltia <[email protected]>
CommitDate: Fri Apr 24 03:23:06 2026 +0000

    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.
---
 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 f9f410f3da..26de098dda 100644
--- a/libavformat/hls_sample_encryption.c
+++ b/libavformat/hls_sample_encryption.c
@@ -88,6 +88,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