diff options
author | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-16 00:24:23 +0000 |
---|---|---|
committer | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-16 00:24:23 +0000 |
commit | 06db1e090bca9874f3d9c334c9dccf0bc22000af (patch) | |
tree | 6dbf1afe445553652ef0d3bcfcc6cb85f2145977 /media | |
parent | e4653cf1ed56b3f1f70c17b9f3dbee32ad47727d (diff) | |
download | chromium_src-06db1e090bca9874f3d9c334c9dccf0bc22000af.zip chromium_src-06db1e090bca9874f3d9c334c9dccf0bc22000af.tar.gz chromium_src-06db1e090bca9874f3d9c334c9dccf0bc22000af.tar.bz2 |
Fix FFmpegAudioDecoder monotonically increasing timestamp check to ignore kNoTimestamp()
BUG=142738
TEST=Cr142738/FFmpegRegressionTest.BasicPlayback/0
Review URL: https://chromiumcodereview.appspot.com/10857010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-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(); } } |