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

Unified Diff: media/filters/ffmpeg_audio_decoder.cc

Issue 10857010: Fix FFmpegAudioDecoder monotonically increasing timestamp check to ignore kNoTimestamp() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add FFmpegRegressionTest Created 8 years, 4 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/ffmpeg/ffmpeg_regression_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index 7a6ee41545da0e8abcbeb5e57223c82ff5678e27..ac9b30fb3c1583c4612ff64de4c28275b578f7fa 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();
}
}
« no previous file with comments | « media/ffmpeg/ffmpeg_regression_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698