diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-16 00:36:08 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-16 00:36:08 +0000 |
commit | 9b2b3ae87d1b1a6e7f210b51e46c78c3ba920d44 (patch) | |
tree | f9c71273bcea546b42ece4e09c66cb76ed9b68c5 /remoting | |
parent | d4919bd899f46bac9265cba2ceb2d976f5a2f31e (diff) | |
download | chromium_src-9b2b3ae87d1b1a6e7f210b51e46c78c3ba920d44.zip chromium_src-9b2b3ae87d1b1a6e7f210b51e46c78c3ba920d44.tar.gz chromium_src-9b2b3ae87d1b1a6e7f210b51e46c78c3ba920d44.tar.bz2 |
Reset decompressor after each frame in DecoderRowBased::DecodePacket().
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/4953001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/base/decoder_row_based.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/remoting/base/decoder_row_based.cc b/remoting/base/decoder_row_based.cc index 1a0efad..8e34e1d 100644 --- a/remoting/base/decoder_row_based.cc +++ b/remoting/base/decoder_row_based.cc @@ -120,13 +120,18 @@ Decoder::DecodeResult DecoderRowBased::DecodePacket( } } - if (state_ == kDone && row_y_ < clip_.height()) { - state_ = kError; - LOG(WARNING) << "Received LAST_PACKET, but didn't get enough data."; - return DECODE_ERROR; - } + if (state_ == kDone) { + if (row_y_ < clip_.height()) { + state_ = kError; + LOG(WARNING) << "Received LAST_PACKET, but didn't get enough data."; + return DECODE_ERROR; + } - return state_ == kDone ? DECODE_DONE : DECODE_IN_PROGRESS; + decompressor_->Reset(); + return DECODE_DONE; + } else { + return DECODE_IN_PROGRESS; + } } void DecoderRowBased::UpdateStateForPacket(const VideoPacket* packet) { |