summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2022-10-21 12:18:21 -0700
committerJames Zern <jzern@google.com>2022-10-21 12:32:14 -0700
commite9e88eef7c1b952c7b6a0cd7772d8888a3e76031 (patch)
tree6aa85a3ffe26d0f34040f1c1ef2aedae8185fecc
parentb919a8f55da076b8d5022023cd6ef90d5e525553 (diff)
downloadlibwebm-e9e88eef7c1b952c7b6a0cd7772d8888a3e76031.tar.gz
vp9_level_stats_tests: add some missing asserts
avoids a segfault if CreateAndLoadSegment() fails Change-Id: Ie9066e6d5de99d0ee7ee0ab0298cf50a10f71f6c
-rw-r--r--common/vp9_level_stats_tests.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/vp9_level_stats_tests.cc b/common/vp9_level_stats_tests.cc
index 0dec071..a39cf37 100644
--- a/common/vp9_level_stats_tests.cc
+++ b/common/vp9_level_stats_tests.cc
@@ -118,7 +118,7 @@ class Vp9LevelStatsTests : public ::testing::Test {
};
TEST_F(Vp9LevelStatsTests, VideoOnlyFile) {
- CreateAndLoadSegment("test_stereo_left_right.webm");
+ ASSERT_NO_FATAL_FAILURE(CreateAndLoadSegment("test_stereo_left_right.webm"));
ProcessTheFrames();
EXPECT_EQ(256, parser_.width());
EXPECT_EQ(144, parser_.height());
@@ -141,7 +141,8 @@ TEST_F(Vp9LevelStatsTests, VideoOnlyFile) {
}
TEST_F(Vp9LevelStatsTests, Muxed) {
- CreateAndLoadSegment("bbb_480p_vp9_opus_1second.webm", 4);
+ ASSERT_NO_FATAL_FAILURE(
+ CreateAndLoadSegment("bbb_480p_vp9_opus_1second.webm", 4));
ProcessTheFrames();
EXPECT_EQ(854, parser_.width());
EXPECT_EQ(480, parser_.height());
@@ -163,7 +164,7 @@ TEST_F(Vp9LevelStatsTests, Muxed) {
}
TEST_F(Vp9LevelStatsTests, SetDuration) {
- CreateAndLoadSegment("test_stereo_left_right.webm");
+ ASSERT_NO_FATAL_FAILURE(CreateAndLoadSegment("test_stereo_left_right.webm"));
ProcessTheFrames();
const int64_t kDurationNano = 2080000000; // 2.08 seconds
stats_.set_duration(kDurationNano);