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

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: ResetTimestampState() on config change. 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
« no previous file with comments | « media/formats/mpeg/mpeg_audio_stream_parser_base.h ('k') | media/formats/webm/webm_audio_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 97a5bac912f27698de267b349babd62ff0823aca..4d0a20287eb3406bb0b0ddc746bc7985f3bccf84 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() {}
@@ -199,9 +201,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_)
« no previous file with comments | « media/formats/mpeg/mpeg_audio_stream_parser_base.h ('k') | media/formats/webm/webm_audio_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698