diff options
author | Heng-Ruey Hsu <henryhsu@google.com> | 2016-06-15 17:40:49 +0800 |
---|---|---|
committer | Heng-Ruey Hsu <henryhsu@google.com> | 2016-06-16 10:53:48 +0800 |
commit | 0e144b8651635c5871952d72ff61b2308726fceb (patch) | |
tree | 03aa6e497d3833c1e69ff7ece8740fab761ebf1e | |
parent | 6d3222c0049eb971b95eeef2bf77361dbeb969dc (diff) | |
download | cts-0e144b8651635c5871952d72ff61b2308726fceb.tar.gz |
Add CSD back after flush
Decoder drops frames without CSD information.
This can fix testCodecResetsH264WithSurface and
testCodecResetsH264WithoutSurface.
BUG=29173382
TEST=pass cts test cases
Change-Id: I5e65e6e917cf3f9066dd1446df124eb00fd24feb
-rwxr-xr-x | tests/tests/media/src/android/media/cts/DecoderTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/tests/media/src/android/media/cts/DecoderTest.java b/tests/tests/media/src/android/media/cts/DecoderTest.java index 676505139f0..29816262d7d 100755 --- a/tests/tests/media/src/android/media/cts/DecoderTest.java +++ b/tests/tests/media/src/android/media/cts/DecoderTest.java @@ -803,7 +803,7 @@ public class DecoderTest extends MediaPlayerTestBase { return decoded; } - private void queueConfig(MediaCodec codec, MediaFormat format) { + private static void queueConfig(MediaCodec codec, MediaFormat format) { for (String csdKey : CSD_KEYS) { if (!format.containsKey(csdKey)) { continue; @@ -1432,6 +1432,10 @@ public class DecoderTest extends MediaPlayerTestBase { codecOutputBuffers = codec.getOutputBuffers(); } else if (resetMode == RESET_MODE_FLUSH) { codec.flush(); + + // We must always queue CSD after a flush that is potentially + // before we receive output format has changed. + queueConfig(codec, format); } // start decode loop |