void packet_t::normalize_timecodes() { // Normalize the timecodes according to the timecode scale. unmodified_assigned_timecode = assigned_timecode; unmodified_duration = duration; timecode = RND_TIMECODE_SCALE(timecode); assigned_timecode = RND_TIMECODE_SCALE(assigned_timecode); if (has_duration()) duration = RND_TIMECODE_SCALE(duration); if (has_bref()) bref = RND_TIMECODE_SCALE(bref); if (has_fref()) fref = RND_TIMECODE_SCALE(fref); }
void packet_t::normalize_timestamps() { // Normalize the timestamps according to the timestamp scale. unmodified_assigned_timestamp = assigned_timestamp; unmodified_duration = duration; timestamp = ROUND_TIMESTAMP_SCALE(timestamp); assigned_timestamp = ROUND_TIMESTAMP_SCALE(assigned_timestamp); if (has_duration()) duration = ROUND_TIMESTAMP_SCALE(duration); if (has_bref()) bref = ROUND_TIMESTAMP_SCALE(bref); if (has_fref()) fref = ROUND_TIMESTAMP_SCALE(fref); }