vp8: fix decoder crash with invalid leading keyframes
decoding the same invalid keyframe twice would result in a crash as the second time through the decoder would be assumed to have been initialized as there was no resolution change. in this case the resolution was itself invalid (0x6), but vp8_peek_si() was only failing in the case of 0x0. invalid-vp80-00-comprehensive-018.ivf.2kf_0x6.ivf tests this case by duplicating the first keyframe and additionally adds a valid one to ensure decoding can resume without error. BUG=b/30593765 Change-Id: If0859035908b7870d67a7f3f646b5a080252eb6d
This commit is contained in:
@@ -158,6 +158,13 @@ class InvalidFileInvalidPeekTest : public InvalidFileTest {
|
||||
|
||||
TEST_P(InvalidFileInvalidPeekTest, ReturnCode) { RunTest(); }
|
||||
|
||||
const DecodeParam kVP8InvalidFileTests[] = {
|
||||
{ 1, "invalid-vp80-00-comprehensive-018.ivf.2kf_0x6.ivf" },
|
||||
};
|
||||
|
||||
VP8_INSTANTIATE_TEST_CASE(InvalidFileInvalidPeekTest,
|
||||
::testing::ValuesIn(kVP8InvalidFileTests));
|
||||
|
||||
const DecodeParam kVP9InvalidFileInvalidPeekTests[] = {
|
||||
{ 1, "invalid-vp90-01-v3.webm" },
|
||||
};
|
||||
@@ -165,6 +172,7 @@ const DecodeParam kVP9InvalidFileInvalidPeekTests[] = {
|
||||
VP9_INSTANTIATE_TEST_CASE(InvalidFileInvalidPeekTest,
|
||||
::testing::ValuesIn(kVP9InvalidFileInvalidPeekTests));
|
||||
|
||||
#if CONFIG_VP9_DECODER
|
||||
const DecodeParam kMultiThreadedVP9InvalidFileTests[] = {
|
||||
{ 4, "invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm" },
|
||||
{ 4,
|
||||
@@ -182,4 +190,5 @@ INSTANTIATE_TEST_CASE_P(
|
||||
::testing::Values(
|
||||
static_cast<const libvpx_test::CodecFactory *>(&libvpx_test::kVP9)),
|
||||
::testing::ValuesIn(kMultiThreadedVP9InvalidFileTests)));
|
||||
#endif // CONFIG_VP9_DECODER
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user