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

Side by Side Diff: media/filters/decrypting_audio_decoder.cc

Issue 339653003: No EOS frame in {Audio|Video}Decoder::OutputCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/decrypting_audio_decoder.h" 5 #include "media/filters/decrypting_audio_decoder.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 290
291 state_ = kWaitingForKey; 291 state_ = kWaitingForKey;
292 return; 292 return;
293 } 293 }
294 294
295 if (status == Decryptor::kNeedMoreData) { 295 if (status == Decryptor::kNeedMoreData) {
296 DVLOG(2) << "DeliverFrame() - kNeedMoreData"; 296 DVLOG(2) << "DeliverFrame() - kNeedMoreData";
297 if (scoped_pending_buffer_to_decode->end_of_stream()) { 297 if (scoped_pending_buffer_to_decode->end_of_stream()) {
298 state_ = kDecodeFinished; 298 state_ = kDecodeFinished;
299 output_cb_.Run(AudioBuffer::CreateEOSBuffer());
300 base::ResetAndReturn(&decode_cb_).Run(kOk); 299 base::ResetAndReturn(&decode_cb_).Run(kOk);
301 return; 300 return;
302 } 301 }
303 302
304 state_ = kIdle; 303 state_ = kIdle;
305 base::ResetAndReturn(&decode_cb_).Run(kOk); 304 base::ResetAndReturn(&decode_cb_).Run(kOk);
306 return; 305 return;
307 } 306 }
308 307
309 DCHECK_EQ(status, Decryptor::kSuccess); 308 DCHECK_EQ(status, Decryptor::kSuccess);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 354 }
356 355
357 frame->set_timestamp(current_time); 356 frame->set_timestamp(current_time);
358 timestamp_helper_->AddFrames(frame->frame_count()); 357 timestamp_helper_->AddFrames(frame->frame_count());
359 358
360 output_cb_.Run(frame); 359 output_cb_.Run(frame);
361 } 360 }
362 } 361 }
363 362
364 } // namespace media 363 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698