[FFmpeg-cvslog] avformat/mov: fix setting dependent disposition on ambisonic IAMF streams
James Almer
git at videolan.org
Tue Mar 5 18:27:36 EET 2024
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Mar 5 13:23:52 2024 -0300| [1a34eb3ffc3236d555b03dd60522545783f10fb7] | committer: James Almer
avformat/mov: fix setting dependent disposition on ambisonic IAMF streams
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a34eb3ffc3236d555b03dd60522545783f10fb7
---
libavformat/mov.c | 5 ++++-
tests/ref/fate/mov-mp4-iamf-ambisonic_1 | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 023892611a..42a50dd2f8 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -926,6 +926,7 @@ static int mov_read_iacb(MOVContext *c, AVIOContext *pb, MOVAtom atom)
for (int i = 0; i < iamf->nb_audio_elements; i++) {
IAMFAudioElement *audio_element = iamf->audio_elements[i];
+ const AVIAMFAudioElement *element;
AVStreamGroup *stg =
avformat_stream_group_create(c->fc, AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT, NULL);
@@ -937,7 +938,7 @@ static int mov_read_iacb(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_iamf_audio_element_free(&stg->params.iamf_audio_element);
stg->id = audio_element->audio_element_id;
/* Transfer ownership */
- stg->params.iamf_audio_element = audio_element->element;
+ element = stg->params.iamf_audio_element = audio_element->element;
audio_element->element = NULL;
for (int j = 0; j < audio_element->nb_substreams; j++) {
@@ -964,6 +965,8 @@ static int mov_read_iacb(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc->refcount++;
}
+ if (element->audio_element_type == AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE)
+ stream->disposition |= AV_DISPOSITION_DEPENDENT;
if (i || j) {
stream->disposition |= AV_DISPOSITION_DEPENDENT;
if (audio_element->layers[0].substream_count == 1)
diff --git a/tests/ref/fate/mov-mp4-iamf-ambisonic_1 b/tests/ref/fate/mov-mp4-iamf-ambisonic_1
index 40c0ee3078..fd2cf82c4d 100644
--- a/tests/ref/fate/mov-mp4-iamf-ambisonic_1
+++ b/tests/ref/fate/mov-mp4-iamf-ambisonic_1
@@ -109,7 +109,7 @@ DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
-DISPOSITION:dependent=0
+DISPOSITION:dependent=1
DISPOSITION:still_image=0
[/STREAM]
[STREAM]
@@ -224,7 +224,7 @@ DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
-DISPOSITION:dependent=0
+DISPOSITION:dependent=1
DISPOSITION:still_image=0
[/STREAM]
[STREAM]
More information about the ffmpeg-cvslog
mailing list