PR #26029 opened by Baptiste Coudurier (bcoudurier)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26029
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26029.patch

movenc wrote DTS in MP4 as `mp4a` with an esds (object type 0xA9), which 
AVFoundation does not recognize: the file shows no audio track. MOV always used 
`dtsc`, even for DTS-HD, and had no `ddts` box.

This writes the ETSI TS 102 114 Annex E sample entry 
(`dtsc`/`dtsh`/`dtsl`/`dtse`, chosen from StreamConstruction) with a `ddts` box 
in both MP4 and MOV. The box is filled from the first packet (core header and 
extension substream components), or from codecpar when the moov is written 
before any packet (fragmented output without `delay_moov`). `-tag:a mp4a` still 
writes the esds.

Tested with core, ES, XCH, XXCH, X96, XBR, XLL, XLL+X96, HD MA 7.1 and DTS:X 
7.1.4 samples:
- AVFoundation reads every MP4 and MOV with the right sample entry, rate, 
channel count and all packets.
- ffmpeg decodes them bit-exact against the source.
- Files remuxed by AVAssetWriter read back in ffmpeg with the same packet data, 
profile and layout.

Adds fate-mov-mp4-dts-core and fate-mov-mp4-dts-hd-ma.

🤖 Generated with [Claude Code](https://claude.com/claude-code)



From 78b4ab4e7bd557318f039e3520ee81690c1dc0f7 Mon Sep 17 00:00:00 2001
From: Baptiste Coudurier <[email protected]>
Date: Fri, 13 Nov 2026 10:23:44 -0800
Subject: [PATCH] avformat/movenc: write DTS sample entries and ddts box

Use dtsc/dtsh/dtsl/dtse with a ddts box per ETSI TS 102 114 Annex E
instead of mp4a, which Apple players do not recognize.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Baptiste Coudurier <[email protected]>
---
 configure                        |   2 +-
 libavformat/movenc.c             | 252 ++++++++++++++++++++++++++++++-
 tests/fate/mov.mak               |   6 +
 tests/ref/fate/mov-mp4-dts-core  |  60 ++++++++
 tests/ref/fate/mov-mp4-dts-hd-ma |  60 ++++++++
 5 files changed, 377 insertions(+), 3 deletions(-)
 create mode 100644 tests/ref/fate/mov-mp4-dts-core
 create mode 100644 tests/ref/fate/mov-mp4-dts-hd-ma

diff --git a/configure b/configure
index 69793448886..dd818237441 100755
--- a/configure
+++ b/configure
@@ -3945,7 +3945,7 @@ mlp_demuxer_select="mlp_parser"
 mmf_muxer_select="riffenc"
 mov_demuxer_select="iso_media riffdec"
 mov_demuxer_suggest="iamfdec zlib"
-mov_muxer_select="cbs_apv_lavf cbs_av1_lavf iso_media iso_writer riffenc 
rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf ac3_parser"
+mov_muxer_select="cbs_apv_lavf cbs_av1_lavf iso_media iso_writer riffenc 
rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf ac3_parser dca_parser"
 mov_muxer_suggest="iamfenc"
 mp3_demuxer_select="mpegaudio_parser"
 mp3_muxer_select="mpegaudioheader"
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index c3fa66d816c..daf628b85b3 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -41,6 +41,8 @@
 #include "apv.h"
 #include "lcevc.h"
 #include "libavcodec/ac3_parser_internal.h"
+#include "libavcodec/dca.h"
+#include "libavcodec/dca_syncwords.h"
 #include "libavcodec/dnxhddata.h"
 #include "libavcodec/flac.h"
 #include "libavcodec/mpegaudiodata.h"
@@ -986,6 +988,231 @@ static int mov_write_dmlp_tag(AVFormatContext *s, 
AVIOContext *pb, MOVTrack *tra
     return update_size(pb, pos);
 }
 
+/* DTS components, used to derive StreamConstruction (ETSI TS 102 114 Table 
E-2) */
+enum {
+    DTS_CORE       = 1 << 0, /* core substream */
+    DTS_CORE_XCH   = 1 << 1,
+    DTS_CORE_XXCH  = 1 << 2,
+    DTS_CORE_X96   = 1 << 3,
+    DTS_EXSS_CORE  = 1 << 4, /* extension substream */
+    DTS_EXSS_XBR   = 1 << 5,
+    DTS_EXSS_XXCH  = 1 << 6,
+    DTS_EXSS_X96   = 1 << 7,
+    DTS_EXSS_LBR   = 1 << 8,
+    DTS_EXSS_XLL   = 1 << 9,
+};
+
+static const uint16_t dts_stream_construction[22] = {
+    [ 1] = DTS_CORE,
+    [ 2] = DTS_CORE | DTS_CORE_XCH,
+    [ 3] = DTS_CORE | DTS_CORE_XXCH,
+    [ 4] = DTS_CORE | DTS_CORE_X96,
+    [ 5] = DTS_CORE | DTS_EXSS_XXCH,
+    [ 6] = DTS_CORE | DTS_EXSS_XBR,
+    [ 7] = DTS_CORE | DTS_CORE_XCH  | DTS_EXSS_XBR,
+    [ 8] = DTS_CORE | DTS_CORE_XXCH | DTS_EXSS_XBR,
+    [ 9] = DTS_CORE | DTS_EXSS_XXCH | DTS_EXSS_XBR,
+    [10] = DTS_CORE | DTS_EXSS_X96,
+    [11] = DTS_CORE | DTS_CORE_XCH  | DTS_EXSS_X96,
+    [12] = DTS_CORE | DTS_CORE_XXCH | DTS_EXSS_X96,
+    [13] = DTS_CORE | DTS_EXSS_XXCH | DTS_EXSS_X96,
+    [14] = DTS_CORE | DTS_EXSS_XLL,
+    [15] = DTS_CORE | DTS_CORE_XCH  | DTS_EXSS_XLL,
+    [16] = DTS_CORE | DTS_CORE_X96  | DTS_EXSS_XLL,
+    [17] = DTS_EXSS_XLL,
+    [18] = DTS_EXSS_LBR,
+    [19] = DTS_EXSS_CORE,
+    [20] = DTS_EXSS_CORE | DTS_EXSS_XXCH,
+    [21] = DTS_EXSS_CORE | DTS_EXSS_XLL,
+};
+
+/* ETSI TS 102 114 Table E-5 */
+static const struct {
+    uint16_t dts;
+    uint64_t mask;
+} dts_channel_layout_map[] = {
+    { 0x0001, AV_CH_FRONT_CENTER },
+    { 0x0002, AV_CH_FRONT_LEFT  | AV_CH_FRONT_RIGHT },
+    { 0x0004, AV_CH_SIDE_LEFT   | AV_CH_SIDE_RIGHT },
+    { 0x0008, AV_CH_LOW_FREQUENCY },
+    { 0x0010, AV_CH_BACK_CENTER },
+    { 0x0020, AV_CH_TOP_FRONT_LEFT  | AV_CH_TOP_FRONT_RIGHT },
+    { 0x0040, AV_CH_BACK_LEFT   | AV_CH_BACK_RIGHT },
+    { 0x0080, AV_CH_TOP_FRONT_CENTER },
+    { 0x0100, AV_CH_TOP_CENTER },
+    { 0x0200, AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER },
+    { 0x0400, AV_CH_WIDE_LEFT   | AV_CH_WIDE_RIGHT },
+    { 0x0800, AV_CH_SIDE_SURROUND_LEFT | AV_CH_SIDE_SURROUND_RIGHT },
+    { 0x1000, AV_CH_LOW_FREQUENCY_2 },
+    { 0x2000, AV_CH_TOP_SIDE_LEFT   | AV_CH_TOP_SIDE_RIGHT },
+    { 0x4000, AV_CH_TOP_BACK_CENTER },
+    { 0x8000, AV_CH_TOP_BACK_LEFT   | AV_CH_TOP_BACK_RIGHT },
+};
+
+typedef struct DTSSpecificInfo {
+    uint8_t  pcm_sample_depth;
+    uint8_t  frame_duration;
+    uint8_t  stream_construction;
+    uint8_t  core_lfe_present;
+    uint8_t  core_layout;
+    uint16_t core_size;
+    uint16_t channel_layout;
+    uint8_t  lbr_duration_mod;
+} DTSSpecificInfo;
+
+static unsigned dts_exss_components(const uint8_t *buf, int size)
+{
+    static const struct { uint32_t sync; unsigned component; } ext[] = {
+        { DCA_SYNCWORD_SUBSTREAM_CORE, DTS_EXSS_CORE },
+        { DCA_SYNCWORD_XBR,            DTS_EXSS_XBR  },
+        { DCA_SYNCWORD_XXCH,           DTS_EXSS_XXCH },
+        { DCA_SYNCWORD_X96,            DTS_EXSS_X96  },
+        { DCA_SYNCWORD_LBR,            DTS_EXSS_LBR  },
+        { DCA_SYNCWORD_XLL,            DTS_EXSS_XLL  },
+    };
+    unsigned components = 0;
+    int wide_hdr, header_size, exss_size;
+    GetBitContext gb;
+
+    if (size < 12 || AV_RB32(buf) != DCA_SYNCWORD_SUBSTREAM)
+        return 0;
+
+    init_get_bits8(&gb, buf, 12);
+    skip_bits_long(&gb, 32 + 8 + 2);
+    wide_hdr    = get_bits1(&gb);
+    header_size = get_bits(&gb,  8 + 4 * wide_hdr) + 1;
+    exss_size   = get_bits(&gb, 16 + 4 * wide_hdr) + 1;
+    if (header_size > exss_size || exss_size > size)
+        return 0;
+
+    for (int i = header_size; i + 4 <= exss_size; i++) {
+        uint32_t sync = AV_RB32(buf + i);
+        for (int j = 0; j < FF_ARRAY_ELEMS(ext); j++)
+            if (sync == ext[j].sync)
+                components |= ext[j].component;
+    }
+
+    return components;
+}
+
+static void dts_get_specific_info(MOVTrack *track, DTSSpecificInfo *info)
+{
+    const AVCodecParameters *par = track->par;
+    const uint8_t *buf = track->extradata[track->last_stsd_index];
+    int size = track->extradata_size[track->last_stsd_index];
+    unsigned components = 0;
+    int frame_size = par->frame_size;
+    int core_pcm_res = -1;
+    DCACoreFrameHeader h;
+    uint64_t mask;
+
+    memset(info, 0, sizeof(*info));
+    info->core_layout = 31;
+
+    if (size >= DCA_CORE_FRAME_HEADER_SIZE && AV_RB32(buf) == 
DCA_SYNCWORD_CORE_BE &&
+        avpriv_dca_parse_core_frame_header(&h, buf, size) >= 0) {
+        components |= DTS_CORE;
+        if (h.ext_audio_present) {
+            if (h.ext_audio_type == 0)
+                components |= DTS_CORE_XCH;
+            else if (h.ext_audio_type == 2)
+                components |= DTS_CORE_X96;
+            else if (h.ext_audio_type == 6)
+                components |= DTS_CORE_XXCH;
+        }
+        info->core_lfe_present = !!h.lfe_present;
+        info->core_layout      = h.audio_mode <= 9 ? h.audio_mode : 31;
+        info->core_size        = FFMIN(h.frame_size, 0x3FFF);
+        core_pcm_res           = h.pcmr_code;
+        if (!frame_size)
+            frame_size = h.npcmblocks * 32;
+        buf  += h.frame_size;
+        size -= h.frame_size;
+    }
+    if (size > 0)
+        components |= dts_exss_components(buf, size);
+
+    if (components) {
+        for (int i = 1; i < FF_ARRAY_ELEMS(dts_stream_construction); i++)
+            if (dts_stream_construction[i] == components)
+                info->stream_construction = i;
+    } else if (par->profile == AV_PROFILE_DTS) {
+        /* no packet yet, e.g. fragmented output without delay_moov */
+        info->stream_construction = 1;
+    } else if (par->profile == AV_PROFILE_DTS_EXPRESS) {
+        info->stream_construction = 18;
+    }
+
+    if (frame_size == 6144) {
+        info->lbr_duration_mod = 1;
+        frame_size = 4096;
+    }
+    info->frame_duration = frame_size >= 4096 ? 3 :
+                           frame_size >= 2048 ? 2 :
+                           frame_size >= 1024 ? 1 : 0;
+
+    if (par->bits_per_raw_sample)
+        info->pcm_sample_depth = par->bits_per_raw_sample > 16 ? 24 : 16;
+    else
+        info->pcm_sample_depth = core_pcm_res >= 0 && core_pcm_res < 2 ? 16 : 
24;
+
+    mask = av_channel_layout_subset(&par->ch_layout, UINT64_MAX);
+    for (int i = 0; i < FF_ARRAY_ELEMS(dts_channel_layout_map); i++)
+        if ((mask & dts_channel_layout_map[i].mask) == 
dts_channel_layout_map[i].mask)
+            info->channel_layout |= dts_channel_layout_map[i].dts;
+}
+
+static uint32_t dts_get_coding_name(const DTSSpecificInfo *info)
+{
+    switch (info->stream_construction) {
+    case  1:
+    case  2:
+    case  4: return MKTAG('d','t','s','c');
+    case 17: return MKTAG('d','t','s','l');
+    case 18: return MKTAG('d','t','s','e');
+    default: return MKTAG('d','t','s','h');
+    }
+}
+
+static int mov_write_ddts_tag(AVIOContext *pb, MOVTrack *track,
+                              const DTSSpecificInfo *info)
+{
+    struct mpeg4_bit_rate_values bit_rates = calculate_mpeg4_bit_rates(track);
+    PutBitContext pbc;
+    uint8_t buf[8];
+
+    avio_wb32(pb, 28);
+    ffio_wfourcc(pb, "ddts");
+    avio_wb32(pb, track->par->sample_rate); /* DTSSamplingFrequency */
+    avio_wb32(pb, bit_rates.max_bit_rate);
+    avio_wb32(pb, bit_rates.avg_bit_rate);
+
+    init_put_bits(&pbc, buf, sizeof(buf));
+    put_bits(&pbc, 8, info->pcm_sample_depth);
+    put_bits(&pbc, 2, info->frame_duration);
+    put_bits(&pbc, 5, info->stream_construction);
+    put_bits(&pbc, 1, info->core_lfe_present);
+    put_bits(&pbc, 6, info->core_layout);
+    put_bits(&pbc, 14, info->core_size);
+    put_bits(&pbc, 1, 0); /* StereoDownmix */
+    put_bits(&pbc, 3, 0); /* RepresentationType */
+    put_bits(&pbc, 16, info->channel_layout);
+    put_bits(&pbc, 1, 0); /* MultiAssetFlag */
+    put_bits(&pbc, 1, info->lbr_duration_mod);
+    put_bits(&pbc, 1, 0); /* ReservedBoxPresent */
+    put_bits(&pbc, 5, 0); /* Reserved */
+    flush_put_bits(&pbc);
+    avio_write(pb, buf, sizeof(buf));
+
+    return 28;
+}
+
+static int is_dts_iso_tag(uint32_t tag)
+{
+    return tag == MKTAG('d','t','s','c') || tag == MKTAG('d','t','s','h') ||
+           tag == MKTAG('d','t','s','l') || tag == MKTAG('d','t','s','e');
+}
+
 static int mov_write_mhac_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack 
*track)
 {
     int64_t pos = avio_tell(pb);
@@ -1467,9 +1694,16 @@ static int mov_write_audio_tag(AVFormatContext *s, 
AVIOContext *pb, MOVMuxContex
 {
     int64_t pos = avio_tell(pb);
     int version = 0;
-    uint32_t tag = track->tag;
+    uint32_t tag;
+    DTSSpecificInfo dts_info = { 0 };
     int ret = 0;
 
+    if (track->par->codec_id == AV_CODEC_ID_DTS && is_dts_iso_tag(track->tag)) 
{
+        dts_get_specific_info(track, &dts_info);
+        track->tag = dts_get_coding_name(&dts_info);
+    }
+    tag = track->tag;
+
     if (track->mode == MODE_MOV) {
         if (track->par->sample_rate > UINT16_MAX || 
!track->par->ch_layout.nb_channels ||
             track->par->codec_id == AV_CODEC_ID_EAC3 ||
@@ -1545,6 +1779,13 @@ static int mov_write_audio_tag(AVFormatContext *s, 
AVIOContext *pb, MOVMuxContex
 
             while (sample_rate > UINT16_MAX)
                 sample_rate >>= 1;
+            if (is_dts_iso_tag(tag)) {
+                /* ETSI TS 102 114 E.2.2.2: base rate of the 48/44.1/32 kHz 
family */
+                while (sample_rate > 48000)
+                    sample_rate >>= 1;
+                while (sample_rate && sample_rate < 32000)
+                    sample_rate <<= 1;
+            }
         }
 
         avio_wb16(pb, 0); /* packet size (= 0) */
@@ -1606,6 +1847,8 @@ static int mov_write_audio_tag(AVFormatContext *s, 
AVIOContext *pb, MOVMuxContex
         ret = mov_write_dops_tag(s, pb, track);
     else if (track->par->codec_id == AV_CODEC_ID_TRUEHD)
         ret = mov_write_dmlp_tag(s, pb, track);
+    else if (is_dts_iso_tag(tag))
+        ret = mov_write_ddts_tag(pb, track, &dts_info);
     else if (track->par->codec_id == AV_CODEC_ID_MPEGH_3D_AUDIO)
         ret = mov_write_mhac_tag(s, pb, track);
     else if (tag == MOV_MP4_IPCM_TAG || tag == MOV_MP4_FPCM_TAG) {
@@ -7247,7 +7490,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
          par->codec_id == AV_CODEC_ID_VP9 ||
          par->codec_id == AV_CODEC_ID_EVC ||
          par->codec_id == AV_CODEC_ID_LCEVC ||
-         par->codec_id == AV_CODEC_ID_TRUEHD) && !trk->extradata_size[0] &&
+         par->codec_id == AV_CODEC_ID_TRUEHD ||
+         par->codec_id == AV_CODEC_ID_DTS) && !trk->extradata_size[0] &&
          !TAG_IS_AVCI(trk->tag)) {
         /* copy frame to create needed atoms */
         trk->extradata_size[0]  = size;
@@ -9524,6 +9768,10 @@ static const AVCodecTag codec_mp4_tags[] = {
     { AV_CODEC_ID_MP2,             MKTAG('m', 'p', '4', 'a') },
     { AV_CODEC_ID_AC3,             MKTAG('a', 'c', '-', '3') },
     { AV_CODEC_ID_EAC3,            MKTAG('e', 'c', '-', '3') },
+    { AV_CODEC_ID_DTS,             MKTAG('d', 't', 's', 'c') },
+    { AV_CODEC_ID_DTS,             MKTAG('d', 't', 's', 'h') },
+    { AV_CODEC_ID_DTS,             MKTAG('d', 't', 's', 'l') },
+    { AV_CODEC_ID_DTS,             MKTAG('d', 't', 's', 'e') },
     { AV_CODEC_ID_DTS,             MKTAG('m', 'p', '4', 'a') },
     { AV_CODEC_ID_TRUEHD,          MKTAG('m', 'l', 'p', 'a') },
     { AV_CODEC_ID_FLAC,            MKTAG('f', 'L', 'a', 'C') },
diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak
index bb94f66f67d..3526d699eb8 100644
--- a/tests/fate/mov.mak
+++ b/tests/fate/mov.mak
@@ -340,6 +340,12 @@ FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call REMUX, MP4 MOV, 
H264_DECODER) \
                           += fate-mov-write-amve
 fate-mov-write-amve: CMD = transcode mov $(TARGET_SAMPLES)/mov/amve.mov mp4 
"-c:v copy" "-c:v copy -t 0.5" "-show_entries stream_side_data_list"
 
+# DTS in MP4 must use the ETSI TS 102 114 Annex E sample entry and ddts box
+FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call REMUX, MP4 MOV, DTS_DEMUXER 
DCA_DECODER) \
+                          += fate-mov-mp4-dts-core fate-mov-mp4-dts-hd-ma
+fate-mov-mp4-dts-core: CMD = transcode dts $(TARGET_SAMPLES)/dts/dts_es.dts 
mp4 "-c copy -t 0.5" "-c copy" "-show_entries 
stream=codec_tag_string,profile,sample_rate,channel_layout"
+fate-mov-mp4-dts-hd-ma: CMD = transcode dts 
$(TARGET_SAMPLES)/dts/master_audio_7.1_24bit.dts mp4 "-c copy -t 0.5" "-c copy" 
"-show_entries stream=codec_tag_string,profile,sample_rate,channel_layout"
+
 # These tests check that Dolby Vision Profile 7 dual-layer content with an
 # hvcE (enhancement-layer HEVC configuration) is preserved on MP4 remux.
 FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call REMUX, MP4 MOV, HEVC_DECODER) \
diff --git a/tests/ref/fate/mov-mp4-dts-core b/tests/ref/fate/mov-mp4-dts-core
new file mode 100644
index 00000000000..34ad727c326
--- /dev/null
+++ b/tests/ref/fate/mov-mp4-dts-core
@@ -0,0 +1,60 @@
+f1a5a3211fa5b9713ab575193df13755 *tests/data/fate/mov-mp4-dts-core.mp4
+95266 tests/data/fate/mov-mp4-dts-core.mp4
+#tb 0: 1/48000
+#media_type 0: audio
+#codec_id 0: dts
+#sample_rate 0: 48000
+#channel_layout_name 0: 6.1
+0,          0,          0,      512,     2012, 0x8198959f
+0,        512,        512,      512,     2012, 0x01239ce2
+0,       1024,       1024,      512,     2012, 0xdad2ae69
+0,       1536,       1536,      512,     2012, 0x4d4ea017
+0,       2048,       2048,      512,     2012, 0xc8099935
+0,       2560,       2560,      512,     2012, 0x4779b39b
+0,       3072,       3072,      512,     2012, 0x6bfdaf30
+0,       3584,       3584,      512,     2012, 0x71de910f
+0,       4096,       4096,      512,     2012, 0x9453aedd
+0,       4608,       4608,      512,     2012, 0x722c9b68
+0,       5120,       5120,      512,     2012, 0x1f9ca19d
+0,       5632,       5632,      512,     2012, 0x147e9c6d
+0,       6144,       6144,      512,     2012, 0x24cfae72
+0,       6656,       6656,      512,     2012, 0xa2f1a8f7
+0,       7168,       7168,      512,     2012, 0x27f4a9bd
+0,       7680,       7680,      512,     2012, 0x18bab708
+0,       8192,       8192,      512,     2012, 0x36d091fa
+0,       8704,       8704,      512,     2012, 0x6692917c
+0,       9216,       9216,      512,     2012, 0x6972c57a
+0,       9728,       9728,      512,     2012, 0x02979a1e
+0,      10240,      10240,      512,     2012, 0xb56694e6
+0,      10752,      10752,      512,     2012, 0x04ebb124
+0,      11264,      11264,      512,     2012, 0xd5249b68
+0,      11776,      11776,      512,     2012, 0x49409567
+0,      12288,      12288,      512,     2012, 0xa1f38825
+0,      12800,      12800,      512,     2012, 0x2ea1b5e3
+0,      13312,      13312,      512,     2012, 0x0fd79a9a
+0,      13824,      13824,      512,     2012, 0x4d6cbbcf
+0,      14336,      14336,      512,     2012, 0x6cada6c6
+0,      14848,      14848,      512,     2012, 0x042fa018
+0,      15360,      15360,      512,     2012, 0x0ed0a574
+0,      15872,      15872,      512,     2012, 0xe35fa09b
+0,      16384,      16384,      512,     2012, 0x97c6893b
+0,      16896,      16896,      512,     2012, 0x16a397ec
+0,      17408,      17408,      512,     2012, 0x0f26ca98
+0,      17920,      17920,      512,     2012, 0xc16daab8
+0,      18432,      18432,      512,     2012, 0x5191a3da
+0,      18944,      18944,      512,     2012, 0x7ee6aea9
+0,      19456,      19456,      512,     2012, 0xdd98b3d9
+0,      19968,      19968,      512,     2012, 0x5313aa0a
+0,      20480,      20480,      512,     2012, 0x68e3b979
+0,      20992,      20992,      512,     2012, 0xbc7dba28
+0,      21504,      21504,      512,     2012, 0x095d9a0b
+0,      22016,      22016,      512,     2012, 0x428c9db7
+0,      22528,      22528,      512,     2012, 0x06d7b53a
+0,      23040,      23040,      512,     2012, 0x3d15a5c8
+0,      23552,      23552,      512,     2012, 0x2c179f7f
+[STREAM]
+profile=30
+codec_tag_string=dtsc
+sample_rate=48000
+channel_layout=6.1
+[/STREAM]
diff --git a/tests/ref/fate/mov-mp4-dts-hd-ma b/tests/ref/fate/mov-mp4-dts-hd-ma
new file mode 100644
index 00000000000..5f17e32d4b8
--- /dev/null
+++ b/tests/ref/fate/mov-mp4-dts-hd-ma
@@ -0,0 +1,60 @@
+a78ed8cc58148b6215115691ea638411 *tests/data/fate/mov-mp4-dts-hd-ma.mp4
+117686 tests/data/fate/mov-mp4-dts-hd-ma.mp4
+#tb 0: 1/48000
+#media_type 0: audio
+#codec_id 0: dts
+#sample_rate 0: 48000
+#channel_layout_name 0: 7.1(wide)
+0,          0,          0,      512,     2508, 0x883ad65d
+0,        512,        512,      512,     2448, 0x54a19761
+0,       1024,       1024,      512,     2500, 0x0a91a632
+0,       1536,       1536,      512,     2508, 0x853fd531
+0,       2048,       2048,      512,     2448, 0x54a19761
+0,       2560,       2560,      512,     2500, 0x0a11a612
+0,       3072,       3072,      512,     2508, 0x853fd531
+0,       3584,       3584,      512,     2448, 0x54a19761
+0,       4096,       4096,      512,     2500, 0x0a11a612
+0,       4608,       4608,      512,     2508, 0x853fd531
+0,       5120,       5120,      512,     2448, 0x54a19761
+0,       5632,       5632,      512,     2500, 0x0c4ea790
+0,       6144,       6144,      512,     2508, 0x84b5d510
+0,       6656,       6656,      512,     2448, 0x54a19761
+0,       7168,       7168,      512,     2500, 0x0c4ea790
+0,       7680,       7680,      512,     2508, 0x84b5d510
+0,       8192,       8192,      512,     2448, 0x54a19761
+0,       8704,       8704,      512,     2500, 0x0c4ea790
+0,       9216,       9216,      512,     2508, 0x8486d4e1
+0,       9728,       9728,      512,     2448, 0x54a19761
+0,      10240,      10240,      512,     2500, 0x0a91a632
+0,      10752,      10752,      512,     2508, 0x883ad65d
+0,      11264,      11264,      512,     2448, 0x54a19761
+0,      11776,      11776,      512,     2500, 0x0a91a632
+0,      12288,      12288,      512,     2508, 0x883ad65d
+0,      12800,      12800,      512,     2448, 0x54a19761
+0,      13312,      13312,      512,     2500, 0x0a91a632
+0,      13824,      13824,      512,     2508, 0x853fd531
+0,      14336,      14336,      512,     2448, 0x54a19761
+0,      14848,      14848,      512,     2500, 0x0a11a612
+0,      15360,      15360,      512,     2508, 0x853fd531
+0,      15872,      15872,      512,     2448, 0x54a19761
+0,      16384,      16384,      512,     2500, 0x0a11a612
+0,      16896,      16896,      512,     2508, 0x853fd531
+0,      17408,      17408,      512,     2448, 0x54a19761
+0,      17920,      17920,      512,     2500, 0x0c4ea790
+0,      18432,      18432,      512,     2508, 0x84b5d510
+0,      18944,      18944,      512,     2448, 0x54a19761
+0,      19456,      19456,      512,     2500, 0x0c4ea790
+0,      19968,      19968,      512,     2508, 0x84b5d510
+0,      20480,      20480,      512,     2448, 0x54a19761
+0,      20992,      20992,      512,     2500, 0x0c4ea790
+0,      21504,      21504,      512,     2508, 0x8486d4e1
+0,      22016,      22016,      512,     2448, 0x54a19761
+0,      22528,      22528,      512,     2500, 0x0a91a632
+0,      23040,      23040,      512,     2508, 0x883ad65d
+0,      23552,      23552,      512,     2448, 0x54a19761
+[STREAM]
+profile=60
+codec_tag_string=dtsh
+sample_rate=48000
+channel_layout=7.1(wide)
+[/STREAM]
-- 
2.54.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to