Commit 8b69be31 authored by Fritz Koenig's avatar Fritz Koenig Committed by Chromium LUCI CQ

media/gpu/test: Allow for multiple flushes for ResetMidStream

This is a short clip.  If the hardware can decode the
clip in it's entirety before sending a reset then
there will be 2 flushes, not 1.

BUG=b:174428494
TEST=tast.video.DecodeAccelVD.vp9_show_existing_frame

Change-Id: Ia22aed2397d25567f019edb5f43740c8efeb0898
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2578381
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Auto-Submit: Fritz Koenig <frkoenig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835843}
parent 0774fed9
......@@ -191,7 +191,11 @@ TEST_F(VideoDecoderTest, ResetMidStream) {
EXPECT_TRUE(tvp->WaitForFlushDone());
EXPECT_EQ(tvp->GetResetDoneCount(), 1u);
EXPECT_EQ(tvp->GetFlushDoneCount(), 1u);
// In the case of a very short clip the decoder may be able
// to decode all the frames before a reset is sent.
// A flush occurs after the last frame, so in this situation
// there will be 2 flushes that occur.
EXPECT_TRUE(tvp->GetFlushDoneCount() == 1u || tvp->GetFlushDoneCount() == 2u);
EXPECT_EQ(tvp->GetFrameDecodedCount(),
numFramesDecoded + g_env->Video()->NumFrames());
EXPECT_TRUE(tvp->WaitForFrameProcessors());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment