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

Git pushed a commit to branch master
in repository ffmpeg.

commit 184d925444d25c2d683f4b794d19d6a969d62623
Author:     James Almer <[email protected]>
AuthorDate: Mon Oct 5 15:57:41 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Mon Oct 12 10:36:18 2026 -0300

    avformat: add side data fields to Stream Groups
    
    Deprecate the Tile Grid specific ones, while keeping it in sync with the new
    fields until removed.
    
    Signed-off-by: James Almer <[email protected]>
---
 doc/APIchanges         |  9 +++++++++
 libavformat/avformat.c |  6 ++++++
 libavformat/avformat.h | 21 +++++++++++++++++++++
 libavformat/demux.c    | 23 +++++++++++++++++++++++
 libavformat/mux.c      | 38 ++++++++++++++++++++++++++++++++++++++
 libavformat/version.h  |  2 +-
 6 files changed, 98 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index d8ad804560..9b8450890c 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,15 @@ The last version increases of all libraries were on 2026-06-23.
 
 API changes, most recent first:
 
+2026-10-12 - xxxxxxxxxx - lavf 63.10.100 - avformat.h
+  Add AVStreamGroupEntry
+  Add AV_STREAM_GROUP_ENTRY_STREAM and AV_STREAM_GROUP_ENTRY_STREAM_GROUP
+  Add AVStreamGroup.entries, AVStreamGroup.nb_entries
+  Add AVStreamGroup.coded_side_data, AVStreamGroup.nb_coded_side_data
+  Add avformat_stream_group_add_stream_group()
+  Deprecate AVStreamGroup.streams, AVStreamGroup.nb_streams
+  Deprecate AVStreamGroupTileGrid.coded_side_data, 
AVStreamGroupTileGrid.nb_coded_side_data
+
 2026-10-xx - xxxxxxxxxx - lavu 61.13.100 - raw_color_params.h
   Add AV_RAW_COLOR_PARAMS_RW2 and AVRW2RawColorParams.
 
diff --git a/libavformat/avformat.c b/libavformat/avformat.c
index f0009eaae5..17c0534de2 100644
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -92,6 +92,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
     for (int i = 0; i < stg->nb_entries; i++)
         av_freep(&stg->entries[i]);
     av_freep(&stg->entries);
+    av_packet_side_data_free(&stg->coded_side_data,
+                             &stg->nb_coded_side_data);
     av_dict_free(&stg->metadata);
     av_freep(&stg->priv_data);
     switch (stg->type) {
@@ -106,8 +108,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
     case AV_STREAM_GROUP_PARAMS_TILE_GRID:
         av_opt_free(stg->params.tile_grid);
         av_freep(&stg->params.tile_grid->offsets);
+#if FF_API_STREAM_GROUP_ENTRIES
+FF_DISABLE_DEPRECATION_WARNINGS
         av_packet_side_data_free(&stg->params.tile_grid->coded_side_data,
                                  &stg->params.tile_grid->nb_coded_side_data);
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
         av_freep(&stg->params.tile_grid);
         break;
     case AV_STREAM_GROUP_PARAMS_TREF:
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 6279150609..fc46ae6b8d 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1071,18 +1071,26 @@ typedef struct AVStreamGroupTileGrid {
      */
     int height;
 
+#if FF_API_STREAM_GROUP_ENTRIES
     /**
      * Additional data associated with the grid.
      *
      * Should be allocated with av_packet_side_data_new() or
      * av_packet_side_data_add(), and will be freed by avformat_free_context().
+     *
+     * @deprecated, use @ref AVStreamGroup.coded_side_data.
      */
+    attribute_deprecated
     AVPacketSideData *coded_side_data;
 
     /**
      * Amount of entries in @ref coded_side_data.
+     *
+     * @deprecated, use @ref AVStreamGroup.nb_coded_side_data.
      */
+    attribute_deprecated
     int nb_coded_side_data;
+#endif
 } AVStreamGroupTileGrid;
 
 /**
@@ -1290,6 +1298,19 @@ typedef struct AVStreamGroup {
      * Freed by libavformat in avformat_free_context().
      */
     AVStreamGroupEntry **entries;
+
+    /**
+     * Additional data associated with the group.
+     *
+     * Should be allocated with av_packet_side_data_new() or
+     * av_packet_side_data_add(), and will be freed by avformat_free_context().
+     */
+    AVPacketSideData *coded_side_data;
+
+    /**
+     * Amount of entries in @ref coded_side_data.
+     */
+    int nb_coded_side_data;
 } AVStreamGroup;
 
 struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
diff --git a/libavformat/demux.c b/libavformat/demux.c
index 97eaa5f9bc..bc74b250f3 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -354,6 +354,29 @@ int avformat_open_input(AVFormatContext **ps, const char 
*filename,
 
     update_stream_avctx(s);
 
+#if FF_API_STREAM_GROUP_ENTRIES
+FF_DISABLE_DEPRECATION_WARNINGS
+    for (unsigned i = 0; i < s->nb_stream_groups; i++) {
+        AVStreamGroup *const  stg = s->stream_groups[i];
+        if (stg->nb_coded_side_data && stg->type == 
AV_STREAM_GROUP_PARAMS_TILE_GRID) {
+            AVStreamGroupTileGrid *tile_grid = stg->params.tile_grid;
+            for (int j = 0;  j < stg->nb_coded_side_data; j++) {
+                const AVPacketSideData *src = &stg->coded_side_data[j];
+                AVPacketSideData *dst = 
av_packet_side_data_new(&tile_grid->coded_side_data,
+                                                                
&tile_grid->nb_coded_side_data,
+                                                                src->type, 
src->size, 0);
+                if (!dst) {
+                    ret = AVERROR(ENOMEM);
+                    goto close;
+                }
+
+                memcpy(dst->data, src->data, src->size);
+            }
+        }
+    }
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
     if (options) {
         av_dict_free(options);
         *options = tmp;
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 01115e9d21..8226840b4c 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -328,6 +328,44 @@ static int init_muxer(AVFormatContext *s, AVDictionary 
**options)
             par->codec_id != AV_CODEC_ID_SMPTE_2038)
             fci->nb_interleaved_streams++;
     }
+    for (unsigned i = 0; i < s->nb_stream_groups; i++) {
+        AVStreamGroup *const  stg = s->stream_groups[i];
+
+        switch (stg->type) {
+        case AV_STREAM_GROUP_PARAMS_TILE_GRID: {
+#if FF_API_STREAM_GROUP_ENTRIES
+FF_DISABLE_DEPRECATION_WARNINGS
+            AVStreamGroupTileGrid *tile_grid = stg->params.tile_grid;
+
+            // If both the global and the deprecated Tile Grid specific
+            // side data arrays are populated, prefer the latter.
+            if (tile_grid->nb_coded_side_data && stg->nb_coded_side_data)
+                av_packet_side_data_free(&stg->coded_side_data,
+                                         &stg->nb_coded_side_data);
+            if (tile_grid->nb_coded_side_data) {
+                for (int j = 0;  j < tile_grid->nb_coded_side_data; j++) {
+                    const AVPacketSideData *src = 
&tile_grid->coded_side_data[j];
+                    AVPacketSideData *dst;
+
+                    dst = av_packet_side_data_new(&stg->coded_side_data,
+                                                  &stg->nb_coded_side_data,
+                                                  src->type, src->size, 0);
+                    if (!dst) {
+                        ret = AVERROR(ENOMEM);
+                        goto fail;
+                    }
+
+                    memcpy(dst->data, src->data, src->size);
+                }
+            }
+            break;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+        }
+        default:
+            break;
+        }
+    }
     fci->interleave_packet = of->interleave_packet;
     if (!fci->interleave_packet)
         fci->interleave_packet = fci->nb_interleaved_streams > 1 ?
diff --git a/libavformat/version.h b/libavformat/version.h
index 1b079ebce8..979952183c 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
 
 #include "version_major.h"
 
-#define LIBAVFORMAT_VERSION_MINOR   9
+#define LIBAVFORMAT_VERSION_MINOR  10
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

-- 
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