Index: media/filters/ffmpeg_video_decoder.cc |
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc |
index ff44bf8a70c6cca00dc561e181d98736767bcabe..3ad262f55250e4ae2b59c73a11f1ceada8cea692 100644 |
--- a/media/filters/ffmpeg_video_decoder.cc |
+++ b/media/filters/ffmpeg_video_decoder.cc |
@@ -179,11 +179,12 @@ void FFmpegVideoDecoder::Reset(const base::Closure& closure) { |
return; |
} |
+ DCHECK(reset_cb_.is_null()); |
+ reset_cb_ = closure; |
+ |
if (decryptor_) |
decryptor_->CancelDecrypt(); |
- reset_cb_ = closure; |
- |
// Defer the reset if a read is pending. |
if (!read_cb_.is_null()) |
return; |
@@ -207,16 +208,18 @@ void FFmpegVideoDecoder::Stop(const base::Closure& closure) { |
return; |
} |
+ DCHECK(stop_cb_.is_null()); |
+ |
if (state_ == kUninitialized) { |
closure.Run(); |
return; |
} |
+ stop_cb_ = closure; |
+ |
if (decryptor_) |
decryptor_->CancelDecrypt(); |
- stop_cb_ = closure; |
- |
// Defer stopping if a read is pending. |
if (!read_cb_.is_null()) |
return; |