Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: media/cast/test/fake_media_source.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cast/test/fake_media_source.cc
diff --git a/media/cast/test/fake_media_source.cc b/media/cast/test/fake_media_source.cc
index 06dd50a9719b0e72d76c7d928383c42bcb7c1ab6..35e5baff392d5f80d6641c15d8033b28d5ba0419 100644
--- a/media/cast/test/fake_media_source.cc
+++ b/media/cast/test/fake_media_source.cc
@@ -289,7 +289,8 @@ void FakeMediaSource::SendNextFakeFrame() {
while (audio_time < video_time) {
if (is_transcoding_audio()) {
Decode(true);
- CHECK(!audio_bus_queue_.empty()) << "No audio decoded.";
+ // No audio decoded.
+ CHECK(!audio_bus_queue_.empty());
std::unique_ptr<AudioBus> bus(audio_bus_queue_.front());
audio_bus_queue_.pop();
audio_frame_input_->InsertAudio(std::move(bus), start_time_ + audio_time);
@@ -429,8 +430,8 @@ base::TimeDelta FakeMediaSource::AudioFrameTime(int frame_number) {
}
void FakeMediaSource::Rewind() {
- CHECK(av_seek_frame(av_format_context_, -1, 0, AVSEEK_FLAG_BACKWARD) >= 0)
- << "Failed to rewind to the beginning.";
+ // Failed to rewind to the beginning.
+ CHECK(av_seek_frame(av_format_context_, -1, 0, AVSEEK_FLAG_BACKWARD) >= 0);
}
ScopedAVPacket FakeMediaSource::DemuxOnePacket(bool* audio) {
@@ -466,7 +467,8 @@ void FakeMediaSource::DecodeAudio(ScopedAVPacket packet) {
int frame_decoded = 0;
int result = avcodec_decode_audio4(av_audio_context_.get(), avframe,
&frame_decoded, &packet_temp);
- CHECK(result >= 0) << "Failed to decode audio.";
+ // Failed to decode audio.
+ CHECK(result >= 0);
packet_temp.size -= result;
packet_temp.data += result;
if (!frame_decoded)
@@ -537,9 +539,9 @@ void FakeMediaSource::DecodeVideo(ScopedAVPacket packet) {
// Video.
int got_picture;
AVFrame* avframe = av_frame_alloc();
+ // Video decode error.
CHECK(avcodec_decode_video2(av_video_context_.get(), avframe, &got_picture,
- packet.get()) >= 0)
- << "Video decode error.";
+ packet.get()) >= 0);
if (!got_picture) {
av_frame_free(&avframe);
return;

Powered by Google App Engine
This is Rietveld 408576698