| Index: media/filters/ffmpeg_audio_decoder.cc
|
| diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
|
| index 51b02c2d214aface2edf18c53c79562bd82f0692..b7e5459df0dc6511945c6df3e3b34ac25cb0a8b8 100644
|
| --- a/media/filters/ffmpeg_audio_decoder.cc
|
| +++ b/media/filters/ffmpeg_audio_decoder.cc
|
| @@ -249,6 +249,16 @@
|
| return;
|
| }
|
|
|
| + if (!buffer->end_of_stream() && !discard_helper_->initialized() &&
|
| + codec_context_->codec_id == AV_CODEC_ID_VORBIS &&
|
| + buffer->timestamp() < base::TimeDelta()) {
|
| + // Dropping frames for negative timestamps as outlined in section A.2
|
| + // in the Vorbis spec. http://xiph.org/vorbis/doc/Vorbis_I_spec.html
|
| + const int discard_frames =
|
| + discard_helper_->TimeDeltaToFrames(-buffer->timestamp());
|
| + discard_helper_->Reset(discard_frames);
|
| + }
|
| +
|
| if (!FFmpegDecode(buffer)) {
|
| state_ = kError;
|
| decode_cb.Run(kDecodeError);
|
|
|