diff --git a/cmd/mp4tool/internal/psshdump/psshdump.go b/cmd/mp4tool/internal/psshdump/psshdump.go index 2d3fba5..368bf0e 100644 --- a/cmd/mp4tool/internal/psshdump/psshdump.go +++ b/cmd/mp4tool/internal/psshdump/psshdump.go @@ -43,7 +43,13 @@ func dump(inputFilePath string) error { for i := range bs { pssh := bs[i].Payload.(*mp4.Pssh) - sysid, _ := pssh.StringifyField("SystemID", "", 0, bs[i].Info.Context) + var sysid string + for i, v := range pssh.SystemID { + sysid += fmt.Sprintf("%02x", v) + if i == 3 || i == 5 || i == 7 || i == 9 { + sysid += "-" + } + } if _, err := bs[i].Info.SeekToStart(r); err != nil { return err diff --git a/cmd/mp4tool/internal/psshdump/psshdump_test.go b/cmd/mp4tool/internal/psshdump/psshdump_test.go index dea7258..2b61a4b 100644 --- a/cmd/mp4tool/internal/psshdump/psshdump_test.go +++ b/cmd/mp4tool/internal/psshdump/psshdump_test.go @@ -24,7 +24,7 @@ func TestPsshdump(t *testing.T) { " size: 52\n" + " version: 1\n" + " flags: 0x000000\n" + - " systemId: \n" + + " systemId: 1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\n" + " dataSize: 0\n" + " base64: \"AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAEBI0VniavN7wEjRWeJq83vAAAAAA==\"\n" + "\n", @@ -37,7 +37,7 @@ func TestPsshdump(t *testing.T) { " size: 52\n" + " version: 1\n" + " flags: 0x000000\n" + - " systemId: \n" + + " systemId: 1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\n" + " dataSize: 0\n" + " base64: \"AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAEBI0VniavN7wEjRWeJq83vAAAAAA==\"\n" + "\n",