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

Unified Diff: media/filters/video_frame_stream.cc

Issue 123213006: Make VideoDecoder use (kAborted, NULL) to signify an aborted decode, instead of (kOk, NULL). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 6 years, 12 months 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
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_frame_stream.cc
diff --git a/media/filters/video_frame_stream.cc b/media/filters/video_frame_stream.cc
index 0c7ccf367992165c1f5cbf62ec028b3df752503d..67adb72efae60f149eace7867d1191c58b261dc2 100644
--- a/media/filters/video_frame_stream.cc
+++ b/media/filters/video_frame_stream.cc
@@ -245,18 +245,17 @@ void VideoFrameStream::OnFrameReady(int buffer_size,
DCHECK(state_ == STATE_NORMAL || state_ == STATE_FLUSHING_DECODER) << state_;
DCHECK(!read_cb_.is_null());
DCHECK(stop_cb_.is_null());
+ DCHECK_EQ(status == VideoDecoder::kOk, frame != NULL);
TRACE_EVENT_ASYNC_END0("media", "VideoFrameStream::Decode", this);
if (status == VideoDecoder::kDecodeError) {
- DCHECK(!frame.get());
state_ = STATE_ERROR;
SatisfyRead(DECODE_ERROR, NULL);
return;
}
if (status == VideoDecoder::kDecryptError) {
- DCHECK(!frame.get());
state_ = STATE_ERROR;
SatisfyRead(DECRYPT_ERROR, NULL);
return;
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698