Skip to content

Commit b6d460a

Browse files
Merge pull request #890 from AOMediaCodec/issue_889
fix #889: Clarify the presence of the num_samples_to_trim_at_end/start fields in OBU header
2 parents af450e9 + 07767f5 commit b6d460a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.bs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ class OBUHeader() {
490490
unsigned int (1) obu_extension_flag;
491491
leb128() obu_size;
492492

493-
if (obu_trimming_status_flag) {
493+
if ((obu_type > 4 && obu_type < 24) && obu_trimming_status_flag) {
494494
leb128() num_samples_to_trim_at_end;
495495
leb128() num_samples_to_trim_at_start;
496496
}
@@ -528,8 +528,7 @@ It SHALL always be set to 0 for the following [=obu_type=] values:
528528

529529
If a decoder encounters an OBU with [=obu_redundant_copy=] = 1, and it has also received the previous non-redundant OBU, it MAY ignore the redundant OBU. If the decoder has not received the previous non-redundant OBU, it SHALL treat the redundant copy as a non-redundant OBU and process the OBU accordingly.
530530

531-
<dfn noexport>obu_trimming_status_flag</dfn> indicates whether this OBU has audio samples to be trimmed. It SHALL be set to 0 or 1 if the [=obu_type=] is set to OBU_IA_Audio_Frame or OBU_IA_Audio_Frame_ID0 to OBU_IA_Audio_Frame_ID17. Otherwise, it SHALL be set to 0.
532-
531+
<dfn noexport>obu_trimming_status_flag</dfn> indicates whether this OBU has audio samples to be trimmed.
533532
For a given coded [=Audio Substream=],
534533
- If an [=Audio Frame OBU=] has its [=num_samples_to_trim_at_start=] field set to a non-zero value N, the decoder SHALL discard the first N audio samples.
535534
- If an [=Audio Frame OBU=] has its [=num_samples_to_trim_at_end=] field set to a non-zero value N, the decoder SHALL discard the last N audio samples.

0 commit comments

Comments
 (0)