summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorYuki Tsuchiya <Yuki.Tsuchiya@sony.com>2019-12-12 23:02:03 +0900
committerJames Almer <jamrial@gmail.com>2019-12-12 11:44:57 -0300
commit632b8298b70969f6ab43509fd276b33295d9e336 (patch)
tree7be6eda71a13bf40f9a16d5b73604f0cee62aa12 /libavformat/movenc.c
parent30047b6a571daa0fbdfa4eb4d907e510ab56ca3f (diff)
lavf/isom: support for demuxing and remuxing of MPEG-H 3D Audio in MP4
Implemented according to the specification at https://www.iso.org/standard/69561.html The 'mhm1' sample entry is registered with MP4RA, which is defined as MHAS encapsulated single stream MPEG-H 3D Audio. 'MHAS' stands for MPEG-H audio stream, which contains encoded audio data and corresponds metadata for decoding. This patch enables extracting the MHAS bitstream from MP4 and remuxing into MP4. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index dd144ae20a..8456bfac6d 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2493,6 +2493,7 @@ static int mov_write_stbl_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext
mov_write_stts_tag(pb, track);
if ((track->par->codec_type == AVMEDIA_TYPE_VIDEO ||
track->par->codec_id == AV_CODEC_ID_TRUEHD ||
+ track->par->codec_id == AV_CODEC_ID_MPEGH_3D_AUDIO ||
track->par->codec_tag == MKTAG('r','t','p',' ')) &&
track->has_keyframes && track->has_keyframes < track->entry)
mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE);
@@ -6875,6 +6876,7 @@ const AVCodecTag codec_mp4_tags[] = {
{ AV_CODEC_ID_DVD_SUBTITLE, MKTAG('m', 'p', '4', 's') },
{ AV_CODEC_ID_MOV_TEXT , MKTAG('t', 'x', '3', 'g') },
{ AV_CODEC_ID_BIN_DATA , MKTAG('g', 'p', 'm', 'd') },
+ { AV_CODEC_ID_MPEGH_3D_AUDIO, MKTAG('m', 'h', 'm', '1') },
{ AV_CODEC_ID_NONE , 0 },
};