diff options
author | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 16:15:51 +0000 |
---|---|---|
committer | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 16:15:51 +0000 |
commit | e4064fd590ff5d6a5aef2777a84b4ea80c450d9d (patch) | |
tree | 0b3f7eabdcf336b1029bdcdc12c2e7eb6b34a293 /webkit | |
parent | fbd9d1b26204242b060e56c1b2c15bd492e9d97d (diff) | |
download | chromium_src-e4064fd590ff5d6a5aef2777a84b4ea80c450d9d.zip chromium_src-e4064fd590ff5d6a5aef2777a84b4ea80c450d9d.tar.gz chromium_src-e4064fd590ff5d6a5aef2777a84b4ea80c450d9d.tar.bz2 |
Make ChunkDemuxer error handling more consistent and robust.
This fixes a variety of error cases exposed by the WebKit LayoutTests I created to test this code. The ChunkDemuxer unit tests were updated to expose these cases as well.
BUG=86536
TEST=ChunkDemuxerTest.*
Review URL: http://codereview.chromium.org/7538027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95425 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webmediaplayer_impl.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc index 76a9909..ba3eedb 100644 --- a/webkit/glue/webmediaplayer_impl.cc +++ b/webkit/glue/webmediaplayer_impl.cc @@ -841,6 +841,8 @@ void WebMediaPlayerImpl::sourceEndOfStream( media::PipelineStatus pipeline_status = media::PIPELINE_OK; switch(status) { + case WebKit::WebMediaPlayer::EosNoError: + break; case WebKit::WebMediaPlayer::EosNetworkError: pipeline_status = media::PIPELINE_ERROR_NETWORK; break; @@ -925,11 +927,14 @@ void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) { LOG(DFATAL) << "PIPELINE_OK isn't an error!"; break; + case media::PIPELINE_ERROR_NETWORK: + SetNetworkState(WebMediaPlayer::NetworkError); + break; + case media::PIPELINE_ERROR_INITIALIZATION_FAILED: case media::PIPELINE_ERROR_REQUIRED_FILTER_MISSING: case media::PIPELINE_ERROR_COULD_NOT_RENDER: case media::PIPELINE_ERROR_URL_NOT_FOUND: - case media::PIPELINE_ERROR_NETWORK: case media::PIPELINE_ERROR_READ: case media::DEMUXER_ERROR_COULD_NOT_OPEN: case media::DEMUXER_ERROR_COULD_NOT_PARSE: |