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

Side by Side Diff: media/ffmpeg/ffmpeg_common.cc

Issue 257563007: Don't double correct for discarded codec delay frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style cleanup. Fix rendundant Initialize(). Created 6 years, 8 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
« no previous file with comments | « media/ffmpeg/ffmpeg_common.h ('k') | media/filters/audio_file_reader.h » ('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/ffmpeg/ffmpeg_common.h" 5 #include "media/ffmpeg/ffmpeg_common.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 case kSampleFormatPlanarS16: 263 case kSampleFormatPlanarS16:
264 return AV_SAMPLE_FMT_S16P; 264 return AV_SAMPLE_FMT_S16P;
265 case kSampleFormatPlanarF32: 265 case kSampleFormatPlanarF32:
266 return AV_SAMPLE_FMT_FLTP; 266 return AV_SAMPLE_FMT_FLTP;
267 default: 267 default:
268 DVLOG(1) << "Unknown SampleFormat: " << sample_format; 268 DVLOG(1) << "Unknown SampleFormat: " << sample_format;
269 } 269 }
270 return AV_SAMPLE_FMT_NONE; 270 return AV_SAMPLE_FMT_NONE;
271 } 271 }
272 272
273 static void AVCodecContextToAudioDecoderConfig( 273 void AVCodecContextToAudioDecoderConfig(
274 const AVCodecContext* codec_context, 274 const AVCodecContext* codec_context,
275 bool is_encrypted, 275 bool is_encrypted,
276 AudioDecoderConfig* config, 276 AudioDecoderConfig* config,
277 bool record_stats) { 277 bool record_stats) {
278 DCHECK_EQ(codec_context->codec_type, AVMEDIA_TYPE_AUDIO); 278 DCHECK_EQ(codec_context->codec_type, AVMEDIA_TYPE_AUDIO);
279 279
280 AudioCodec codec = CodecIDToAudioCodec(codec_context->codec_id); 280 AudioCodec codec = CodecIDToAudioCodec(codec_context->codec_id);
281 281
282 SampleFormat sample_format = 282 SampleFormat sample_format =
283 AVSampleFormatToSampleFormat(codec_context->sample_fmt); 283 AVSampleFormatToSampleFormat(codec_context->sample_fmt);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 return false; 572 return false;
573 573
574 *out = parsed_time; 574 *out = parsed_time;
575 return true; 575 return true;
576 } 576 }
577 577
578 return false; 578 return false;
579 } 579 }
580 580
581 } // namespace media 581 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common.h ('k') | media/filters/audio_file_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698