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

Unified Diff: media/filters/chunk_demuxer.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/filters/chunk_demuxer.h ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 83711f12b7f663deea3b74c893864551d0a903d9..12d74373b50323c4b83c2447b7f637a6609a4851 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -615,7 +615,7 @@ bool ChunkDemuxer::EvictCodedFrames(const std::string& id,
return itr->second->EvictCodedFrames(media_time_dts, newDataSize);
}
-void ChunkDemuxer::AppendData(const std::string& id,
+bool ChunkDemuxer::AppendData(const std::string& id,
const uint8_t* data,
size_t length,
TimeDelta append_window_start,
@@ -637,7 +637,7 @@ void ChunkDemuxer::AppendData(const std::string& id,
bool old_waiting_for_data = IsSeekWaitingForData_Locked();
if (length == 0u)
- return;
+ return true;
DCHECK(data);
@@ -649,19 +649,16 @@ void ChunkDemuxer::AppendData(const std::string& id,
append_window_end,
timestamp_offset)) {
ReportError_Locked(CHUNK_DEMUXER_ERROR_APPEND_FAILED);
- return;
+ return false;
}
break;
case PARSE_ERROR:
- DVLOG(1) << "AppendData(): Ignoring data after a parse error.";
- return;
-
case WAITING_FOR_INIT:
case ENDED:
case SHUTDOWN:
DVLOG(1) << "AppendData(): called in unexpected state " << state_;
- return;
+ return false;
}
// Check to see if data was appended at the pending seek point. This
@@ -675,6 +672,7 @@ void ChunkDemuxer::AppendData(const std::string& id,
}
host_->OnBufferedTimeRangesChanged(ranges);
+ return true;
}
void ChunkDemuxer::ResetParserState(const std::string& id,
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698