This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit ee4a4c4d72d2719e6779d17a758885f5a140071c Author: Niklas Haas <[email protected]> AuthorDate: Mon Oct 19 14:00:47 2026 +0200 Commit: James Almer <[email protected]> CommitDate: Fri Oct 23 20:33:53 2026 +0000 avformat/demux: set up size for gain map stream groups Mirroring the existing logic for LCEVC, except using the size of the base layer rather than the size of the EL. Signed-off-by: Niklas Haas <[email protected]> --- libavformat/demux.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index 1eb6eb328a..359ae2612b 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -3232,21 +3232,34 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) /* update the stream group parameters from the stream contexts if needed */ for (unsigned i = 0; i < ic->nb_stream_groups; i++) { AVStreamGroup *const stg = ic->stream_groups[i]; - AVStreamGroupLayeredVideo *lcevc; - const AVStream *st; + AVStreamGroupLayeredVideo *stglv; + const AVStreamGroupEntry *stge; - if (stg->type != AV_STREAM_GROUP_PARAMS_LCEVC) + switch (stg->type) { + case AV_STREAM_GROUP_PARAMS_LCEVC: + /* For LCEVC in mpegts, the parser is needed to get the + * enhancement layer dimensions */ + stglv = stg->params.layered_video; + stge = stg->entries[stglv->el_index]; + break; + case AV_STREAM_GROUP_PARAMS_GAIN_MAP: + /* A gain map is presented at the size of its base rendition */ + stglv = stg->params.layered_video; + if (stg->nb_entries != 2 || stglv->el_index >= 2) + continue; + stge = stg->entries[!stglv->el_index]; + if (stge->type != AV_STREAM_GROUP_ENTRY_STREAM) + continue; + break; + default: continue; + } - /* For LCEVC in mpegts, the parser is needed to get the enhancement layer - * dimensions */ - lcevc = stg->params.layered_video; - if (lcevc->width && lcevc->height) + if (stglv->width && stglv->height) continue; - av_assert0(stg->entries[lcevc->el_index]->type == AV_STREAM_GROUP_ENTRY_STREAM); - st = stg->entries[lcevc->el_index]->stream; - lcevc->width = st->codecpar->width; - lcevc->height = st->codecpar->height; + av_assert0(stge->type == AV_STREAM_GROUP_ENTRY_STREAM); + stglv->width = stge->stream->codecpar->width; + stglv->height = stge->stream->codecpar->height; } find_stream_info_err: -- 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]
