Add unit test to test tile decoding error handling.
Also fix bugs related with corrupted frame handling. Return VPX_CODEC_CORRUPT_FRAME when getting corrupted block. Change-Id: I7207ccc7c68c4df2b40b561315d16e49ccf7ff41
This commit is contained in:
@@ -39,8 +39,8 @@ vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size,
|
||||
return res_dec;
|
||||
}
|
||||
|
||||
void DecoderTest::RunLoop(CompressedVideoSource *video) {
|
||||
vpx_codec_dec_cfg_t dec_cfg = {0};
|
||||
void DecoderTest::RunLoop(CompressedVideoSource *video,
|
||||
const vpx_codec_dec_cfg_t &dec_cfg) {
|
||||
Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0);
|
||||
ASSERT_TRUE(decoder != NULL);
|
||||
const char *codec_name = decoder->GetDecoderName();
|
||||
@@ -82,7 +82,12 @@ void DecoderTest::RunLoop(CompressedVideoSource *video) {
|
||||
while ((img = dec_iter.Next()))
|
||||
DecompressedFrameHook(*img, video->frame_number());
|
||||
}
|
||||
|
||||
delete decoder;
|
||||
}
|
||||
|
||||
void DecoderTest::RunLoop(CompressedVideoSource *video) {
|
||||
vpx_codec_dec_cfg_t dec_cfg = {0};
|
||||
RunLoop(video, dec_cfg);
|
||||
}
|
||||
|
||||
} // namespace libvpx_test
|
||||
|
||||
Reference in New Issue
Block a user