Don't crash if a frame returned from the decoder is too old.

BUG=crbug/371805
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/16559004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6187 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org 2014-05-19 13:31:35 +00:00
parent 725e582461
commit 64339a7069

View File

@ -58,7 +58,12 @@ int32_t VCMDecodedFrameCallback::Decoded(I420VideoFrame& decodedImage)
_timestampMap.Pop(decodedImage.timestamp())); _timestampMap.Pop(decodedImage.timestamp()));
callback = _receiveCallback; callback = _receiveCallback;
} }
assert(frameInfo != NULL);
if (frameInfo == NULL) {
LOG(LS_WARNING) << "Too many frames backed up in the decoder, dropping "
"this one.";
return WEBRTC_VIDEO_CODEC_OK;
}
_timing.StopDecodeTimer( _timing.StopDecodeTimer(
decodedImage.timestamp(), decodedImage.timestamp(),