Validate error checking code in decoder.

This patch adds a mechanism for insuring error checking on invalid files
by creating a unit test that runs the decoder and tests that the error
code matches what's expected on each frame in the decoder.

Disabled for now as this unit test will segfault with existing code.

Change-Id: I896f9686d9ebcbf027426933adfbea7b8c5d956e
This commit is contained in:
Jim Bankoski
2014-06-20 13:52:06 -07:00
parent 8a78dc4911
commit dc2f2ce594
5 changed files with 124 additions and 1 deletions

View File

@@ -35,7 +35,8 @@ void DecoderTest::RunLoop(CompressedVideoSource *video) {
PreDecodeFrameHook(*video, decoder);
vpx_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(),
video->frame_size());
ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
if (!HandleDecodeResult(res_dec, *video, decoder))
break;
DxDataIterator dec_iter = decoder->GetDxData();
const vpx_image_t *img = NULL;