Fix loadCompleted flag in MediaChunk implementations.

This flag was always set even if the load was canceled and not completed.

PiperOrigin-RevId: 315659262
This commit is contained in:
tonihei 2020-06-10 11:04:51 +01:00 committed by Oliver Woodman
parent b0d98a2e22
commit 2a9144fa56
2 changed files with 2 additions and 2 deletions

View file

@ -138,7 +138,7 @@ public class ContainerMediaChunk extends BaseMediaChunk {
} finally { } finally {
Util.closeQuietly(dataSource); Util.closeQuietly(dataSource);
} }
loadCompleted = true; loadCompleted = !loadCanceled;
} }
/** /**

View file

@ -349,7 +349,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
if (!hasGapTag) { if (!hasGapTag) {
loadMedia(); loadMedia();
} }
loadCompleted = true; loadCompleted = !loadCanceled;
} }
} }