This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/7.0 in repository ffmpeg.
commit 67641670cc5f46375f70d128203f941f0d3370b2 Author: James Almer <[email protected]> AuthorDate: Fri Feb 27 10:41:31 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Fri Feb 27 12:27:55 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 <[email protected]> (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 6b6360d314..d83bd1a006 100644 --- a/libavformat/iamf_reader.c +++ b/libavformat/iamf_reader.c @@ -94,6 +94,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 b638ca0654..1dd8bef4e4 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -10114,7 +10114,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", @@ -10149,6 +10149,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 b32ddb3617..b3c03a373b 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ #include "version_major.h" #define LIBAVFORMAT_VERSION_MINOR 1 -#define LIBAVFORMAT_VERSION_MICRO 101 +#define LIBAVFORMAT_VERSION_MICRO 102 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
