Release output buffer when dropping frame in HardwareVideoDecoder.

Bug: webrtc:9128
Change-Id: I0952367f74eea4603b74d822dc13b231bcba5ff6
Reviewed-on: https://webrtc-review.googlesource.com/68520
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24227}
This commit is contained in:
Sami Kalliomäki 2018-08-08 12:42:34 +02:00 committed by Commit Bot
parent 8e5014a392
commit 43fa99c0ab
2 changed files with 1 additions and 1 deletions

View File

@ -423,6 +423,7 @@ class HardwareVideoDecoder implements VideoDecoder, VideoSink {
synchronized (renderedTextureMetadataLock) {
if (renderedTextureMetadata != null) {
codec.releaseOutputBuffer(index, false);
return; // We are still waiting for texture for the previous frame, drop this one.
}
surfaceTextureHelper.setTextureSize(width, height);

View File

@ -324,7 +324,6 @@ public class HardwareVideoDecoderTest {
}
@Test
@Ignore("TODO(webrtc:9128): Fix")
public void testSurfaceTextureStall_FramesDropped() throws InterruptedException {
final int numFrames = 10;
// Maximum number of frame the decoder can keep queued on the output side.