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
diff --git a/webrtc/modules/video_coding/main/source/generic_decoder.cc b/webrtc/modules/video_coding/main/source/generic_decoder.cc
index 07663e1..cb0faf9 100644
--- a/webrtc/modules/video_coding/main/source/generic_decoder.cc
+++ b/webrtc/modules/video_coding/main/source/generic_decoder.cc
@@ -58,7 +58,12 @@
             _timestampMap.Pop(decodedImage.timestamp()));
         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(
         decodedImage.timestamp(),