From 800acc88d88c5a7ac75b61eadc4780f95ad7ae26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbjo=CC=88rn=20Einarsson?= Date: Tue, 5 Jan 2021 18:27:23 +0100 Subject: [PATCH] fix: detailed defaultSampleFlags Info for tfhd box --- mp4/testdata/golden_1_frag_m4s_dump.txt | 8 ++++---- mp4/tfhd.go | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mp4/testdata/golden_1_frag_m4s_dump.txt b/mp4/testdata/golden_1_frag_m4s_dump.txt index d2fbf4c0..7fcf4e4a 100644 --- a/mp4/testdata/golden_1_frag_m4s_dump.txt +++ b/mp4/testdata/golden_1_frag_m4s_dump.txt @@ -12,7 +12,7 @@ - trackID: 2 - defaultBaseIsMoof: true - defaultSampleDuration: 3000 - - defaultSampleFlags: 01010000 + - defaultSampleFlags: 01010000 (isLeading=0 dependsOn=1 isDependedOn=0 hasRedundancy=0 padding=0 isNonSync=true degradationPriority=0) [tfdt] size=16 version=0 - baseMediaDecodeTime: 0 [trun] size=144 version=1 @@ -45,7 +45,7 @@ - trackID: 2 - defaultBaseIsMoof: true - defaultSampleDuration: 3000 - - defaultSampleFlags: 01010000 + - defaultSampleFlags: 01010000 (isLeading=0 dependsOn=1 isDependedOn=0 hasRedundancy=0 padding=0 isNonSync=true degradationPriority=0) [tfdt] size=16 version=0 - baseMediaDecodeTime: 45000 [trun] size=140 version=1 @@ -77,7 +77,7 @@ - trackID: 2 - defaultBaseIsMoof: true - defaultSampleDuration: 3000 - - defaultSampleFlags: 01010000 + - defaultSampleFlags: 01010000 (isLeading=0 dependsOn=1 isDependedOn=0 hasRedundancy=0 padding=0 isNonSync=true degradationPriority=0) [tfdt] size=16 version=0 - baseMediaDecodeTime: 90000 [trun] size=144 version=1 @@ -110,7 +110,7 @@ - trackID: 2 - defaultBaseIsMoof: true - defaultSampleDuration: 3000 - - defaultSampleFlags: 01010000 + - defaultSampleFlags: 01010000 (isLeading=0 dependsOn=1 isDependedOn=0 hasRedundancy=0 padding=0 isNonSync=true degradationPriority=0) [tfdt] size=16 version=0 - baseMediaDecodeTime: 135000 [trun] size=140 version=1 diff --git a/mp4/tfhd.go b/mp4/tfhd.go index d743a7d2..b15cb9e8 100644 --- a/mp4/tfhd.go +++ b/mp4/tfhd.go @@ -194,7 +194,8 @@ func (t *TfhdBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string bd.write(" - defaultSampleSize: %d", t.DefaultSampleSize) } if t.HasDefaultSampleFlags() { - bd.write(" - defaultSampleFlags: %08x", t.DefaultSampleFlags) + bd.write(" - defaultSampleFlags: %08x (%s)", t.DefaultSampleFlags, DecodeSampleFlags(t.DefaultSampleFlags)) + } return bd.err }