Fix flag issue causing corrupt output on DRM playbacks.

The issue is visible for DRM playbacks because
BUFFER_FLAG_ENCRYPTED is being cleared, which results
in trying to play encrypted samples without decryption.
The issue would have also incorrectly cleared key frame
flags too, for both clear and encrypted playbacks, but
I don't think we're using that flag downstream anywhere
and so the issue wasn't visible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123426582
This commit is contained in:
olly 2016-05-27 09:36:40 -07:00 committed by Oliver Woodman
parent 7bab9cabfb
commit 8322592ee8

View file

@ -239,7 +239,7 @@ public final class DefaultTrackOutput implements TrackOutput {
return TrackStream.FORMAT_READ;
case TrackStream.BUFFER_READ:
if (buffer.timeUs < decodeOnlyUntilUs) {
buffer.setFlags(C.BUFFER_FLAG_DECODE_ONLY);
buffer.addFlag(C.BUFFER_FLAG_DECODE_ONLY);
}
// Read encryption data if the sample is encrypted.
if (buffer.isEncrypted()) {