Merge "Only log first input reader length" am: 8a0fc3a87b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12984593

Change-Id: I627c698346986dad7fd56894c58d9191d957abb0
This commit is contained in:
Santiago Seifert
2020-11-05 18:54:45 +00:00
committed by Automerger Merge Worker

View File

@@ -1186,11 +1186,10 @@ public final class MediaParser {
// TODO: For efficiency, the same implementation should be used, by providing a
// clearBuffers() method, or similar.
long resourceLength = seekableInputReader.getLength();
if (resourceLength == -1) {
mResourceByteCount = -1;
}
if (mResourceByteCount != -1) {
mResourceByteCount += resourceLength;
if (mResourceByteCount == 0) {
// For resource byte count metric collection, we only take into account the length
// of the first provided input reader.
mResourceByteCount = resourceLength;
}
mExtractorInput =
new DefaultExtractorInput(