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

Unified Diff: media/blink/websourcebuffer_impl.cc

Issue 2076673005: MSE: Plumb ChunkDemuxer appendData failures into append Error algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the layout test Created 4 years, 6 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
Index: media/blink/websourcebuffer_impl.cc
diff --git a/media/blink/websourcebuffer_impl.cc b/media/blink/websourcebuffer_impl.cc
index f210ea538bb54e23c9b982b26c29910dd31a15b6..1c7a4490f60fd7a9d5f75a03a274204c45140c89 100644
--- a/media/blink/websourcebuffer_impl.cc
+++ b/media/blink/websourcebuffer_impl.cc
@@ -99,13 +99,12 @@ bool WebSourceBufferImpl::evictCodedFrames(double currentPlaybackTime,
newDataSize);
}
-void WebSourceBufferImpl::append(
- const unsigned char* data,
- unsigned length,
- double* timestamp_offset) {
+bool WebSourceBufferImpl::append(const unsigned char* data,
+ unsigned length,
+ double* timestamp_offset) {
base::TimeDelta old_offset = timestamp_offset_;
- demuxer_->AppendData(id_, data, length, append_window_start_,
- append_window_end_, &timestamp_offset_);
+ bool success = demuxer_->AppendData(id_, data, length, append_window_start_,
+ append_window_end_, &timestamp_offset_);
// Coded frame processing may update the timestamp offset. If the caller
// provides a non-NULL |timestamp_offset| and frame processing changes the
@@ -114,6 +113,8 @@ void WebSourceBufferImpl::append(
// more than microsecond precision.
if (timestamp_offset && old_offset != timestamp_offset_)
*timestamp_offset = timestamp_offset_.InSecondsF();
+
+ return success;
}
void WebSourceBufferImpl::resetParserState() {

Powered by Google App Engine
This is Rietveld 408576698