From 8f5b81fa8d815a9bdd486c28170b432bbb1ee50f Mon Sep 17 00:00:00 2001 From: James Zern Date: Sat, 21 Jun 2014 19:04:12 -0700 Subject: [PATCH] decode_test_driver: check HasFailure() in RunLoop avoids unnecessary errors due to e.g., read (Next()) failures Change-Id: I70b1d09766456f1c55367d98299b5abd7afff842 --- test/decode_test_driver.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/decode_test_driver.cc b/test/decode_test_driver.cc index 2defacc46..12da25fd3 100644 --- a/test/decode_test_driver.cc +++ b/test/decode_test_driver.cc @@ -31,7 +31,8 @@ void DecoderTest::RunLoop(CompressedVideoSource *video) { ASSERT_TRUE(decoder != NULL); // Decode frames. - for (video->Begin(); video->cxdata(); video->Next()) { + for (video->Begin(); !::testing::Test::HasFailure() && video->cxdata(); + video->Next()) { PreDecodeFrameHook(*video, decoder); vpx_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(), video->frame_size()); -- 2.40.0