Commit 5ee49b9b authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

media: Revert crash on SourceBufferState::Append() failure

This partially reverts
https://chromium-review.googlesource.com/c/chromium/src/+/739743
that added crash code to investigate the BUG.

TBR=dalecurtis@chromium.org,wolenetz@chromium.org
BUG=778363,779379

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I246f7f3f82763b8dc6ae5c00eb01714419e5fdec
Reviewed-on: https://chromium-review.googlesource.com/742229Reviewed-by: default avatarMatthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512892}
parent 1c2f9135
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "base/callback_helpers.h" #include "base/callback_helpers.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "media/base/media_switches.h" #include "media/base/media_switches.h"
#include "media/base/media_track.h" #include "media/base/media_track.h"
...@@ -228,23 +227,6 @@ bool SourceBufferState::Append(const uint8_t* data, ...@@ -228,23 +227,6 @@ bool SourceBufferState::Append(const uint8_t* data,
<< __func__ << ": stream parsing failed. Data size=" << length << __func__ << ": stream parsing failed. Data size=" << length
<< " append_window_start=" << append_window_start.InSecondsF() << " append_window_start=" << append_window_start.InSecondsF()
<< " append_window_end=" << append_window_end.InSecondsF(); << " append_window_end=" << append_window_end.InSecondsF();
// Crash with a 1/10 chance to investigate https://crbug.com/778363.
// CHECK on different conditions so we can more easily distinguish between
// different cases.
// TODO(crbug.com/778363): Remove after investigation is done.
int n = base::RandInt(1, 10);
if (state_ == PARSER_INITIALIZED) {
if (encrypted_media_init_data_reported_)
CHECK(n != 1);
else
CHECK(n != 2);
} else {
if (encrypted_media_init_data_reported_)
CHECK(n != 3);
else
CHECK(n != 4);
}
} }
timestamp_offset_during_append_ = NULL; timestamp_offset_during_append_ = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment