Clear the correct buffer in MediaCodecRenderer

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156131086
This commit is contained in:
olly 2017-05-15 18:11:45 -07:00 committed by Oliver Woodman
parent a4a3154604
commit fb3c190556

View file

@ -488,7 +488,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
}
if (format == null) {
// We don't have a format yet, so try and read one.
buffer.clear();
flagsOnlyBuffer.clear();
int result = readSource(formatHolder, flagsOnlyBuffer, true);
if (result == C.RESULT_FORMAT_READ) {
onInputFormatChanged(formatHolder.format);