summaryrefslogtreecommitdiff
path: root/vp9/simple_encode.cc
diff options
context:
space:
mode:
authorAngie Chiang <angiebird@google.com>2021-06-18 16:09:41 -0700
committerAngie Chiang <angiebird@google.com>2021-06-21 14:38:13 -0700
commita1fdfbb174487e5efb76e6e77119d2e50840086e (patch)
tree369f52ea75f804c747c1d1b71d804e237f10fcb1 /vp9/simple_encode.cc
parent338013712e516d07388651437918e6328ea909f5 (diff)
downloadlibvpx-a1fdfbb174487e5efb76e6e77119d2e50840086e.tar.gz
Fix flaky assertions in SimpleEncode
Bug: webm:1731 Change-Id: Ieecb98a7ac19e6291acd5d51432dc6a3789e9552
Diffstat (limited to 'vp9/simple_encode.cc')
-rw-r--r--vp9/simple_encode.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/vp9/simple_encode.cc b/vp9/simple_encode.cc
index 8ff5ad3c9..87727cb12 100644
--- a/vp9/simple_encode.cc
+++ b/vp9/simple_encode.cc
@@ -1009,8 +1009,7 @@ T *GetVectorData(const std::vector<T> &v) {
static GOP_COMMAND GetGopCommand(const std::vector<int> &gop_map,
int start_show_index) {
GOP_COMMAND gop_command;
- if (gop_map.size() > 0) {
- assert(static_cast<size_t>(start_show_index) < gop_map.size());
+ if (static_cast<size_t>(start_show_index) < gop_map.size()) {
assert((gop_map[start_show_index] & kGopMapFlagStart) != 0);
int end_show_index = start_show_index + 1;
// gop_map[end_show_index] & kGopMapFlagStart == 0 means this is