Skip to content

Commit

Permalink
Merge pull request #13 from DolbyLaboratories/dolby/atmos_storage/asd…
Browse files Browse the repository at this point in the history
…cplib_integration/asdcplib_internal_trackID

 Fix trackID bug in AS_DCP_internal
  • Loading branch information
jhursty authored Aug 27, 2021
2 parents 1f8506f + 36406bc commit 623b3ae
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/AS_DCP_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ extern MXF::RIP *g_RIP;
m_HeaderPart.AddChildObject(m_MaterialPackage);
m_ContentStorage->Packages.push_back(m_MaterialPackage->InstanceUID);

ui32_t trackID = 1;
if ( tc_frame_rate )
{
TrackSet<TimecodeComponent> MPTCTrack =
Expand All @@ -742,12 +743,13 @@ extern MXF::RIP *g_RIP;
m_DurationUpdateList.push_back(&(MPTCTrack.Sequence->Duration.get()));
MPTCTrack.Clip->Duration.set_has_value();
m_DurationUpdateList.push_back(&(MPTCTrack.Clip->Duration.get()));
trackID++;
}

TrackSet<SourceClip> MPTrack =
CreateTrackAndSequence<MaterialPackage, SourceClip>(m_HeaderPart, *m_MaterialPackage,
TrackName, clip_edit_rate, DataDefinition,
2, m_Dict);
trackID, m_Dict);
MPTrack.Sequence->Duration.set_has_value();
m_DurationUpdateList.push_back(&(MPTrack.Sequence->Duration.get()));

Expand All @@ -756,7 +758,7 @@ extern MXF::RIP *g_RIP;
MPTrack.Sequence->StructuralComponents.push_back(MPTrack.Clip->InstanceUID);
MPTrack.Clip->DataDefinition = DataDefinition;
MPTrack.Clip->SourcePackageID = SourcePackageUMID;
MPTrack.Clip->SourceTrackID = 2;
MPTrack.Clip->SourceTrackID = trackID;

MPTrack.Clip->Duration.set_has_value();
m_DurationUpdateList.push_back(&(MPTrack.Clip->Duration.get()));
Expand All @@ -773,6 +775,7 @@ extern MXF::RIP *g_RIP;
m_HeaderPart.AddChildObject(m_FilePackage);
m_ContentStorage->Packages.push_back(m_FilePackage->InstanceUID);

trackID = 1;
if ( tc_frame_rate )
{
TrackSet<TimecodeComponent> FPTCTrack =
Expand All @@ -783,12 +786,13 @@ extern MXF::RIP *g_RIP;
m_DurationUpdateList.push_back(&(FPTCTrack.Sequence->Duration.get()));
FPTCTrack.Clip->Duration.set_has_value();
m_DurationUpdateList.push_back(&(FPTCTrack.Clip->Duration.get()));
trackID++;
}

TrackSet<SourceClip> FPTrack =
CreateTrackAndSequence<SourcePackage, SourceClip>(m_HeaderPart, *m_FilePackage,
TrackName, clip_edit_rate, DataDefinition,
2, m_Dict);
trackID, m_Dict);

FPTrack.Sequence->Duration.set_has_value();
m_DurationUpdateList.push_back(&(FPTrack.Sequence->Duration.get()));
Expand Down

0 comments on commit 623b3ae

Please sign in to comment.