[ffmpeg] branch release/8.0 updated (15504610b0 -> 27b8d1a017)
This is an automated email from the git hooks/post-receive script. Git pushed a change to branch release/8.0 in repository ffmpeg. from 15504610b0 avformat/whip: remove the confused option buffer_size new 415c801ab5 avformat/mov: fix setting iamf stream id offsets new 27b8d1a017 avformat/mov: fix cases where we discard iamf packets from enabled streams The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: libavformat/iamf_reader.c | 3 +++ libavformat/mov.c | 26 +++++++++++++++++++++++--- libavformat/version.h | 2 +- 3 files changed, 27 insertions(+), 4 deletions(-)
This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.0 in repository ffmpeg. commit 415c801ab54e520524fd3388e5a201cf52dcfc4c Author: James Almer <jamrial@gmail.com> AuthorDate: Fri Feb 27 10:38:14 2026 -0300 Commit: James Almer <jamrial@gmail.com> CommitDate: Fri Feb 27 12:19:31 2026 -0300 avformat/mov: fix setting iamf stream id offsets If we were to add the highest id of a non iamf stream as offset to iamf stream ids, and one of the latter was 0, then an id overlap would ocurr. Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 51aef95ba156b7848eca5445f0f59b091c3b1004) --- libavformat/mov.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index f3945c2be2..d722fc3deb 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -10573,7 +10573,7 @@ static int mov_parse_lcevc_streams(AVFormatContext *s) static void fix_stream_ids(AVFormatContext *s) { - int highest_id = 0; + int highest_id = 0, lowest_iamf_id = INT_MAX; for (int i = 0; i < s->nb_streams; i++) { const AVStream *st = s->streams[i]; @@ -10581,7 +10581,21 @@ static void fix_stream_ids(AVFormatContext *s) if (!sc->iamf) highest_id = FFMAX(highest_id, st->id); } - highest_id += !highest_id; + + for (int i = 0; i < s->nb_stream_groups; i++) { + AVStreamGroup *stg = s->stream_groups[i]; + if (stg->type != AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT) + continue; + for (int j = 0; j < stg->nb_streams; j++) { + AVStream *st = stg->streams[j]; + lowest_iamf_id = FFMIN(lowest_iamf_id, st->id); + } + } + + if (highest_id < lowest_iamf_id) + return; + + highest_id += !lowest_iamf_id; for (int i = 0; highest_id > 1 && i < s->nb_stream_groups; i++) { AVStreamGroup *stg = s->stream_groups[i]; if (stg->type != AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT)
This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.0 in repository ffmpeg. commit 27b8d1a017de62b51c0f3a039327b5cc2d7ea13f Author: James Almer <jamrial@gmail.com> AuthorDate: Fri Feb 27 10:41:31 2026 -0300 Commit: James Almer <jamrial@gmail.com> CommitDate: Fri Feb 27 12:27:15 2026 -0300 avformat/mov: fix cases where we discard iamf packets from enabled streams Given the entire iamf struct is inside a single Track, if the first iamf stream (which is the one sharing the index and id from the Track) was to be disabled, then packets from every iamf stream would be discarded. Fix this by actually going through the entire iamf Sample and discarding those from the disabled streams only. Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 16ee3d8d99a2f2e83a2559e958e19ede813b29f8) --- libavformat/iamf_reader.c | 3 +++ libavformat/mov.c | 8 +++++++- libavformat/version.h | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libavformat/iamf_reader.c b/libavformat/iamf_reader.c index f7abdf4207..2098f264aa 100644 --- a/libavformat/iamf_reader.c +++ b/libavformat/iamf_reader.c @@ -95,6 +95,9 @@ static int audio_frame_obu(AVFormatContext *s, const IAMFDemuxContext *c, memcpy(side_data, c->recon, c->recon_size); } + if (st->discard == AVDISCARD_ALL) + pkt->flags |= AV_PKT_FLAG_DISCARD; + pkt->stream_index = st->index; return 0; } diff --git a/libavformat/mov.c b/libavformat/mov.c index d722fc3deb..49498eda77 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -11153,7 +11153,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) sample->size = FFMIN(sample->size, (mov->next_root_atom - sample->pos)); } - if (st->discard != AVDISCARD_ALL) { + if (st->discard != AVDISCARD_ALL || sc->iamf) { int64_t ret64 = avio_seek(sc->pb, sample->pos, SEEK_SET); if (ret64 != sample->pos) { av_log(mov->fc, AV_LOG_ERROR, "stream %d, offset 0x%"PRIx64": partial file\n", @@ -11189,6 +11189,12 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } size -= ret; + + if (pkt->flags & AV_PKT_FLAG_DISCARD) { + av_packet_unref(pkt); + ret = 0; + continue; + } pkt->pts = pts; pkt->dts = dts; pkt->pos = pos; pkt->flags |= flags; pkt->duration = duration; diff --git a/libavformat/version.h b/libavformat/version.h index 7ff1483912..ee91990360 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ #include "version_major.h" #define LIBAVFORMAT_VERSION_MINOR 3 -#define LIBAVFORMAT_VERSION_MICRO 100 +#define LIBAVFORMAT_VERSION_MICRO 101 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \
participants (2)
-
ffmpeg-git -
James Almer