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

Unified Diff: media/formats/mpeg/mpeg_audio_stream_parser_base.cc

Issue 239423005: Wire up codec_delay() to MP3StreamParser and FFmpegAudioDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch codec_delay() to frames. 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 side-by-side diff with in-line comments
Download patch
Index: media/formats/mpeg/mpeg_audio_stream_parser_base.cc
diff --git a/media/formats/mpeg/mpeg_audio_stream_parser_base.cc b/media/formats/mpeg/mpeg_audio_stream_parser_base.cc
index aaf6a50bb39d62b851e01ed74f9737b054245479..3a1272827ef0a8d39c0de9fa5d344a39463544bc 100644
--- a/media/formats/mpeg/mpeg_audio_stream_parser_base.cc
+++ b/media/formats/mpeg/mpeg_audio_stream_parser_base.cc
@@ -44,11 +44,13 @@ static int LocateEndOfHeaders(const uint8_t* buf, int buf_len, int i) {
}
MPEGAudioStreamParserBase::MPEGAudioStreamParserBase(uint32 start_code_mask,
- AudioCodec audio_codec)
+ AudioCodec audio_codec,
+ int codec_delay)
: state_(UNINITIALIZED),
in_media_segment_(false),
start_code_mask_(start_code_mask),
- audio_codec_(audio_codec) {}
+ audio_codec_(audio_codec),
+ codec_delay_(codec_delay) {}
MPEGAudioStreamParserBase::~MPEGAudioStreamParserBase() {}
@@ -193,9 +195,16 @@ int MPEGAudioStreamParserBase::ParseFrame(const uint8* data,
}
if (!config_.IsValidConfig()) {
- config_.Initialize(audio_codec_, kSampleFormatF32, channel_layout,
- sample_rate, NULL, 0, false, false,
- base::TimeDelta(), base::TimeDelta());
+ config_.Initialize(audio_codec_,
+ kSampleFormatF32,
+ channel_layout,
+ sample_rate,
+ NULL,
+ 0,
+ false,
+ false,
+ base::TimeDelta(),
+ codec_delay_);
base::TimeDelta base_timestamp;
if (timestamp_helper_)

Powered by Google App Engine
This is Rietveld 408576698