Skip to content

Commit

Permalink
An error occurs in some players if the track_ID is different
Browse files Browse the repository at this point in the history
  • Loading branch information
getroot committed Oct 28, 2024
1 parent e9ccb20 commit 4a4824e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/projects/modules/containers/bmff/bmff_packager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ namespace bmff

// track_ID is an integer that uniquely identifies this track over the entire life‐time of this presentation. Track IDs are never re-used and cannot be zero.
// track_ID + 1 because zero track ID is valid for OME
stream.WriteBE32(GetMediaTrack()->GetId()+1); // track_ID
stream.WriteBE32(1); // track_ID
stream.WriteBE32(0); // reserved
stream.WriteBE32(0); // duration
stream.WriteBE32(0); // reserved
Expand Down Expand Up @@ -1101,7 +1101,7 @@ namespace bmff
ov::ByteStream stream(4096);

// uint(16) ES_ID;
stream.WriteBE16(GetMediaTrack()->GetId()+1);
stream.WriteBE16(1);
// bit(1) streamDependenceFlag; disabled
// bit(1) URL_Flag; disabled
// bit(1) OCRstreamFlag; disabled
Expand Down Expand Up @@ -1405,7 +1405,7 @@ namespace bmff
ov::ByteStream stream(24);

// unsigned int(32) track_ID;
stream.WriteBE32(GetMediaTrack()->GetId()+1);
stream.WriteBE32(1);

// unsigned int(32) default_sample_description_index;
stream.WriteBE32(1);
Expand Down Expand Up @@ -1665,7 +1665,7 @@ namespace bmff
ov::ByteStream stream(64);

// unsigned int(32) track_ID;
stream.WriteBE32(GetMediaTrack()->GetId()+1);
stream.WriteBE32(1);

// unsigned int(64) base_data_offset;

Expand Down

0 comments on commit 4a4824e

Please sign in to comment.