Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
chenda6 committed Feb 1, 2024
1 parent 2d5b3c0 commit 73aa7a1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packager/media/formats/mp4/box_definitions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2716,13 +2716,13 @@ bool TrackFragmentRun::ReadWriteInternal(BoxBuffer* buffer) {
RCHECK(buffer->ReadWriteUInt32(&sample_flags[i]));

if (sample_composition_time_offsets_present) {
// TODO: MediaLive produces negative composition time offsets in box version 0.
// This is a workaround for that.
#ifdef USE_WORKAROUND_FOR_TRUN_VERSION_0
int32_t sample_offset = sample_composition_time_offsets[i];
RCHECK(buffer->ReadWriteInt32(&sample_offset));
sample_composition_time_offsets[i] = sample_offset;
#else
// TODO: MediaLive produces negative composition time offsets in box version 0.
// This is a workaround for that.
#ifdef USE_WORKAROUND_FOR_TRUN_VERSION_0
int32_t sample_offset = sample_composition_time_offsets[i];
RCHECK(buffer->ReadWriteInt32(&sample_offset));
sample_composition_time_offsets[i] = sample_offset;
#else
if (version == 0) {
uint32_t sample_offset = sample_composition_time_offsets[i];
RCHECK(buffer->ReadWriteUInt32(&sample_offset));
Expand All @@ -2732,7 +2732,7 @@ bool TrackFragmentRun::ReadWriteInternal(BoxBuffer* buffer) {
RCHECK(buffer->ReadWriteInt32(&sample_offset));
sample_composition_time_offsets[i] = sample_offset;
}
#endif
#endif
}
}

Expand Down

0 comments on commit 73aa7a1

Please sign in to comment.