Make MediaCodecTrackRenderer discard non-keyframes after seek.

This means that after a decoder flush, the renderer will avoid
feeding non-keyframes into the decoder until it has received and
fed the first keyframe. The decoder has no way of correctly
decoding non-keyframes that arrive before a keyframe.
This commit is contained in:
Oliver Woodman 2014-09-08 11:21:18 +01:00
parent 5059690a7a
commit 5d35698d8f

View File

@ -449,6 +449,7 @@ public abstract class MediaCodecTrackRenderer extends TrackRenderer {
codecHotswapTimeMs = -1; codecHotswapTimeMs = -1;
inputIndex = -1; inputIndex = -1;
outputIndex = -1; outputIndex = -1;
waitingForFirstSyncFrame = true;
decodeOnlyPresentationTimestamps.clear(); decodeOnlyPresentationTimestamps.clear();
// Workaround for framework bugs. // Workaround for framework bugs.
// See [redacted], [redacted], [redacted]. // See [redacted], [redacted], [redacted].