diff options
-rw-r--r-- | media/ffmpeg/ffmpeg_regression_tests.cc | 3 | ||||
-rw-r--r-- | media/filters/ffmpeg_audio_decoder.cc | 18 |
2 files changed, 14 insertions, 7 deletions
diff --git a/media/ffmpeg/ffmpeg_regression_tests.cc b/media/ffmpeg/ffmpeg_regression_tests.cc index 7b2df81..c0348c2 100644 --- a/media/ffmpeg/ffmpeg_regression_tests.cc +++ b/media/ffmpeg/ffmpeg_regression_tests.cc @@ -145,6 +145,9 @@ FFMPEG_TEST_CASE(Cr140165, "security/140165.ogg", PIPELINE_ERROR_DECODE, FFMPEG_TEST_CASE(Cr140647, "security/140647.ogv", DECODER_ERROR_NOT_SUPPORTED, DECODER_ERROR_NOT_SUPPORTED, kNullHash, kNullHash); +FFMPEG_TEST_CASE(Cr142738, "content/crbug142738.ogg", PIPELINE_OK, PIPELINE_OK, + kNullHash, + "70deafc85a38a6711a3441c8a75414c2"); // General MKV test cases. FFMPEG_TEST_CASE(MKV_0, "security/nested_tags_lang.mka.627.628", PIPELINE_OK, diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc index 7a6ee41..ac9b30f 100644 --- a/media/filters/ffmpeg_audio_decoder.cc +++ b/media/filters/ffmpeg_audio_decoder.cc @@ -200,13 +200,17 @@ void FFmpegAudioDecoder::DoDecodeBuffer( } else { last_input_timestamp_ = input->GetTimestamp(); } - } else if (input->GetTimestamp() < last_input_timestamp_) { - base::TimeDelta diff = input->GetTimestamp() - last_input_timestamp_; - DVLOG(1) << "Input timestamps are not monotonically increasing! " - << " ts " << input->GetTimestamp().InMicroseconds() << " us" - << " diff " << diff.InMicroseconds() << " us"; - base::ResetAndReturn(&read_cb_).Run(kDecodeError, NULL); - return; + } else if (input->GetTimestamp() != kNoTimestamp()) { + if (input->GetTimestamp() < last_input_timestamp_) { + base::TimeDelta diff = input->GetTimestamp() - last_input_timestamp_; + DVLOG(1) << "Input timestamps are not monotonically increasing! " + << " ts " << input->GetTimestamp().InMicroseconds() << " us" + << " diff " << diff.InMicroseconds() << " us"; + base::ResetAndReturn(&read_cb_).Run(kDecodeError, NULL); + return; + } + + last_input_timestamp_ = input->GetTimestamp(); } } |