diff options
author | ronghuawu@chromium.org <ronghuawu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 02:14:58 +0000 |
---|---|---|
committer | ronghuawu@chromium.org <ronghuawu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 02:14:58 +0000 |
commit | 7ab0a911f94230b6d80e760d3112b016f23edc07 (patch) | |
tree | e5c2ed3f2271266c144801d266cac165e2483aea /media/base | |
parent | 18b28abfc0a6afc32d44bafeff5caf4db80d0524 (diff) | |
download | chromium_src-7ab0a911f94230b6d80e760d3112b016f23edc07.zip chromium_src-7ab0a911f94230b6d80e760d3112b016f23edc07.tar.gz chromium_src-7ab0a911f94230b6d80e760d3112b016f23edc07.tar.bz2 |
Flush regardless if there's pending read, because there's no guarantee that the video decoder will fullfill the pending read. For example, in the RTC case, the video call may have been stopped by the time or the network may have broken, as a result the pending read may never complete.
So I think we should always call the decoder flush and the decoder will take care of any pending request (with dummy or real frame) before flush.
BUG=123134
TEST=media_unittests and webrtc video call
Review URL: http://codereview.chromium.org/10094016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base')
-rw-r--r-- | media/base/filters.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/base/filters.h b/media/base/filters.h index b32234f..e10048c 100644 --- a/media/base/filters.h +++ b/media/base/filters.h @@ -125,6 +125,9 @@ class MEDIA_EXPORT VideoDecoder : public Filter { // Non-NULL frames contain decoded video data or may indicate the end of // the stream. NULL video frames indicate an aborted read. This can happen if // the DemuxerStream gets flushed and doesn't have any more data to return. + // + // When Flush() is called VideoDecoder implementations should fulfill pending + // reads prior to executing the Flush() callback. typedef base::Callback<void(scoped_refptr<VideoFrame>)> ReadCB; virtual void Read(const ReadCB& read_cb) = 0; |