diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-09 04:13:04 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-09 04:13:04 +0000 |
commit | 1fd715b39f72cda8aa352d2a18723d0ae98b7a7d (patch) | |
tree | 4f80d778079f2d400bd6b06125a139020e7aaf35 /remoting/codec | |
parent | da07ae05a5d82640c43b6f3d8daf7e59fd87abc3 (diff) | |
download | chromium_src-1fd715b39f72cda8aa352d2a18723d0ae98b7a7d.zip chromium_src-1fd715b39f72cda8aa352d2a18723d0ae98b7a7d.tar.gz chromium_src-1fd715b39f72cda8aa352d2a18723d0ae98b7a7d.tar.bz2 |
Fix VPX decoder not to crash when vpx_codec_error() returns NULL.
BUG=360114
Review URL: https://codereview.chromium.org/229643002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262613 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/codec')
-rw-r--r-- | remoting/codec/video_decoder_vpx.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/remoting/codec/video_decoder_vpx.cc b/remoting/codec/video_decoder_vpx.cc index 3cfd8a1..e414ee8 100644 --- a/remoting/codec/video_decoder_vpx.cc +++ b/remoting/codec/video_decoder_vpx.cc @@ -99,9 +99,10 @@ bool VideoDecoderVpx::DecodePacket(const VideoPacket& packet) { codec_.get(), reinterpret_cast<const uint8*>(packet.data().data()), packet.data().size(), NULL, 0); if (ret != VPX_CODEC_OK) { - LOG(ERROR) << "Decoding failed:" << vpx_codec_err_to_string(ret) << "\n" - << "Details: " << vpx_codec_error(codec_.get()) << "\n" - << vpx_codec_error_detail(codec_.get()); + const char* error = vpx_codec_error(codec_.get()); + const char* error_detail = vpx_codec_error_detail(codec_.get()); + LOG(ERROR) << "Decoding failed:" << (error ? error : "(NULL)") << "\n" + << "Details: " << (error_detail ? error_detail : "(NULL)"); return false; } |