OLD | NEW |
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 364 |
365 base::TimeDelta current_time = timestamp_helper_->GetTimestamp(); | 365 base::TimeDelta current_time = timestamp_helper_->GetTimestamp(); |
366 if (IsOutOfSync(current_time, frame->timestamp())) { | 366 if (IsOutOfSync(current_time, frame->timestamp())) { |
367 DVLOG(1) << "Timestamp returned by the decoder (" | 367 DVLOG(1) << "Timestamp returned by the decoder (" |
368 << frame->timestamp().InMilliseconds() << " ms)" | 368 << frame->timestamp().InMilliseconds() << " ms)" |
369 << " does not match the input timestamp and number of samples" | 369 << " does not match the input timestamp and number of samples" |
370 << " decoded (" << current_time.InMilliseconds() << " ms)."; | 370 << " decoded (" << current_time.InMilliseconds() << " ms)."; |
371 } | 371 } |
372 | 372 |
373 frame->set_timestamp(current_time); | 373 frame->set_timestamp(current_time); |
| 374 frame->set_duration( |
| 375 timestamp_helper_->GetFrameDuration(frame->frame_count())); |
374 timestamp_helper_->AddFrames(frame->frame_count()); | 376 timestamp_helper_->AddFrames(frame->frame_count()); |
375 } | 377 } |
376 } | 378 } |
377 | 379 |
378 } // namespace media | 380 } // namespace media |
OLD | NEW |