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

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: Rebase 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
« no previous file with comments | « media/blink/websourcebuffer_impl.h ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/websourcebuffer_impl.cc
diff --git a/media/blink/websourcebuffer_impl.cc b/media/blink/websourcebuffer_impl.cc
index d60a19f7d9133ecd0fa845d60bf335fce4f80a55..78e9290af999994d5171c6fe9b021f536395dfbe 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() {
« no previous file with comments | « media/blink/websourcebuffer_impl.h ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698