VP8 wrapper: Adding check for no show frames (NULL images)

Review URL: http://webrtc-codereview.appspot.com/102001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@341 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mikhal@google.com 2011-08-09 22:12:19 +00:00
parent 1a023c95d8
commit 9e9f86743c

View File

@ -796,6 +796,12 @@ VP8Decoder::Decode(const EncodedImage& inputImage,
img = vpx_codec_get_frame(_decoder, &_iter);
if (img == NULL)
{
// Decoder OK and NULL image => No show frame
return WEBRTC_VIDEO_CODEC_OK;
}
// Allocate memory for decoded image
WebRtc_UWord32 requiredSize = (3 * img->h * img->w) >> 1;
if (_decodedImage._buffer != NULL)