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:
parent
8e5014a392
commit
43fa99c0ab
@ -423,6 +423,7 @@ class HardwareVideoDecoder implements VideoDecoder, VideoSink {
|
|||||||
|
|
||||||
synchronized (renderedTextureMetadataLock) {
|
synchronized (renderedTextureMetadataLock) {
|
||||||
if (renderedTextureMetadata != null) {
|
if (renderedTextureMetadata != null) {
|
||||||
|
codec.releaseOutputBuffer(index, false);
|
||||||
return; // We are still waiting for texture for the previous frame, drop this one.
|
return; // We are still waiting for texture for the previous frame, drop this one.
|
||||||
}
|
}
|
||||||
surfaceTextureHelper.setTextureSize(width, height);
|
surfaceTextureHelper.setTextureSize(width, height);
|
||||||
|
|||||||
@ -324,7 +324,6 @@ public class HardwareVideoDecoderTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore("TODO(webrtc:9128): Fix")
|
|
||||||
public void testSurfaceTextureStall_FramesDropped() throws InterruptedException {
|
public void testSurfaceTextureStall_FramesDropped() throws InterruptedException {
|
||||||
final int numFrames = 10;
|
final int numFrames = 10;
|
||||||
// Maximum number of frame the decoder can keep queued on the output side.
|
// Maximum number of frame the decoder can keep queued on the output side.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user