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

Unified Diff: media/filters/decrypting_audio_decoder.cc

Issue 11189082: Update PluginInstance for audio support for content decryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 8 years, 2 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/base/decryptor.h ('k') | media/filters/decrypting_audio_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_audio_decoder.cc
diff --git a/media/filters/decrypting_audio_decoder.cc b/media/filters/decrypting_audio_decoder.cc
index 298b11b223318a23a7d47219114e4846136fa391..4ef49b07d5216239cc563154fa9d2620a9e10d05 100644
--- a/media/filters/decrypting_audio_decoder.cc
+++ b/media/filters/decrypting_audio_decoder.cc
@@ -197,8 +197,8 @@ void DecryptingAudioDecoder::DoRead(const ReadCB& read_cb) {
}
if (!queued_audio_frames_.empty()) {
- if (queued_audio_frames_.front()->IsEndOfStream())
- state_ = kDecodeFinished;
+ DCHECK(!queued_audio_frames_.front()->IsEndOfStream());
+ DCHECK_GT(queued_audio_frames_.front()->GetDataSize(), 0);
read_cb.Run(kOk, queued_audio_frames_.front());
queued_audio_frames_.pop_front();
return;
@@ -368,6 +368,7 @@ void DecryptingAudioDecoder::DoDeliverFrame(
// No frames returned in the list should be an end-of-stream (EOS) frame.
// EOS frame should be returned separately as (kNeedMoreData, NULL).
DCHECK(!first_frame->IsEndOfStream());
+ DCHECK_GT(first_frame->GetDataSize(), 0);
state_ = kIdle;
base::ResetAndReturn(&read_cb_).Run(kOk, first_frame);
}
« no previous file with comments | « media/base/decryptor.h ('k') | media/filters/decrypting_audio_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698