Remove support for MKV invisible flag

We haven't seen it used anywhere in practice. It's a niche feature not
supported by any other extractors, and is one of the very few things
stopping us from simplifying MediaSource implementations to not set the
decodeOnly sample flag. This is a simplification that we want to make,
since the current mechanism doesn't work properly for cases where a
downstream decoder adjusts the buffer presentation timestamps so that
they're different on the output side than on the input side.

PiperOrigin-RevId: 316712302
This commit is contained in:
olly 2020-06-16 18:46:18 +01:00 committed by Andrew Lewis
parent 2273b00a53
commit e6b6a86a77
2 changed files with 2 additions and 3 deletions

View file

@ -176,6 +176,7 @@
timestamps ([#7464](https://github.com/google/ExoPlayer/issues/7464)).
* Ogg: Allow non-contiguous pages
([#7230](https://github.com/google/ExoPlayer/issues/7230)).
* Matroska: Remove support for "Invisible" block header flag.
* Extractors:
* Add `IndexSeeker` for accurate seeks in VBR MP3 streams
([#6787](https://github.com/google/ExoPlayer/issues/6787)). This seeker

View file

@ -1196,11 +1196,9 @@ public class MatroskaExtractor implements Extractor {
int timecode = (scratch.data[0] << 8) | (scratch.data[1] & 0xFF);
blockTimeUs = clusterTimecodeUs + scaleTimecodeToUs(timecode);
boolean isInvisible = (scratch.data[2] & 0x08) == 0x08;
boolean isKeyframe = track.type == TRACK_TYPE_AUDIO
|| (id == ID_SIMPLE_BLOCK && (scratch.data[2] & 0x80) == 0x80);
blockFlags = (isKeyframe ? C.BUFFER_FLAG_KEY_FRAME : 0)
| (isInvisible ? C.BUFFER_FLAG_DECODE_ONLY : 0);
blockFlags = isKeyframe ? C.BUFFER_FLAG_KEY_FRAME : 0;
blockState = BLOCK_STATE_DATA;
blockSampleIndex = 0;
}