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 49fb9b44d5 avformat/matroskadec: add support for more than one 
BlockAdditionMapping of type ITU-T T.35
49fb9b44d5 is described below

commit 49fb9b44d5eadca5bef123801ddd27407220c074
Author:     James Almer <[email protected]>
AuthorDate: Mon Sep 14 10:44:56 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Sat Sep 19 18:42:47 2026 -0300

    avformat/matroskadec: add support for more than one BlockAdditionMapping of 
type ITU-T T.35
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/matroskadec.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 8e24433cf8..bceb4f7e17 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2534,8 +2534,25 @@ static int 
mkv_parse_block_addition_mappings(AVFormatContext *s, AVStream *st, M
 {
     const EbmlList *mappings_list = &track->block_addition_mappings;
     MatroskaBlockAdditionMapping *mappings = mappings_list->elem;
+    int nb_itutt35 = 0;
     int ret;
 
+    for (int i = 0; i < mappings_list->nb_elem; i++) {
+        MatroskaBlockAdditionMapping *mapping = &mappings[i];
+
+        switch (mapping->type) {
+        case MATROSKA_BLOCK_ADD_ID_TYPE_ITU_T_T35:
+            if (nb_itutt35 && mapping->extradata.size < 4) {
+                av_log(s, AV_LOG_ERROR, "One or more maps for BlockAddIDType 4 
lack extradata\n");
+                return AVERROR_INVALIDDATA;
+            }
+            nb_itutt35++;
+            break;
+        default:
+            break;
+        }
+    }
+
     for (int i = 0; i < mappings_list->nb_elem; i++) {
         MatroskaBlockAdditionMapping *mapping = &mappings[i];
         uint64_t type = mapping->type;
@@ -2548,7 +2565,6 @@ static int 
mkv_parse_block_addition_mappings(AVFormatContext *s, AVStream *st, M
             type = MATROSKA_BLOCK_ADD_ID_TYPE_OPAQUE;
             av_fallthrough;
         case MATROSKA_BLOCK_ADD_ID_TYPE_OPAQUE:
-        case MATROSKA_BLOCK_ADD_ID_TYPE_ITU_T_T35:
             if (mapping->value != type) {
                 int strict = s->strict_std_compliance >= FF_COMPLIANCE_STRICT;
                 av_log(s, strict ? AV_LOG_ERROR : AV_LOG_WARNING,

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to