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

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

Issue 111153003: FFmpeg fixups for M33 roll. Now with more Opus! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DEPS update. Created 7 years 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
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/opus_audio_decoder.h" 5 #include "media/filters/opus_audio_decoder.h"
6 6
7 #include <cmath> 7 #include <cmath>
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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 output_buffer->get()->TrimEnd(discard_padding); 594 output_buffer->get()->TrimEnd(discard_padding);
595 frames_decoded -= discard_padding; 595 frames_decoded -= discard_padding;
596 } 596 }
597 } else if (bytes_decoded > 0) { 597 } else if (bytes_decoded > 0) {
598 frames_to_discard_ -= frames_decoded; 598 frames_to_discard_ -= frames_decoded;
599 frames_decoded = 0; 599 frames_decoded = 0;
600 } 600 }
601 601
602 // Decoding finished successfully, update statistics. 602 // Decoding finished successfully, update statistics.
603 PipelineStatistics statistics; 603 PipelineStatistics statistics;
604 statistics.audio_bytes_decoded = 604 statistics.audio_bytes_decoded = input->data_size();
605 frames_decoded *
606 demuxer_stream_->audio_decoder_config().bytes_per_frame();
607 statistics_cb_.Run(statistics); 605 statistics_cb_.Run(statistics);
608 606
607 // Discard the buffer to indicate we need more data.
608 if (!frames_decoded)
609 *output_buffer = NULL;
610
609 return true; 611 return true;
610 } 612 }
611 613
612 } // namespace media 614 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698