Add logging statements to places where the frame might be dropped in WebRTC pipeline.
BUG=b/31645554
Review-Url: https://codereview.webrtc.org/2361803003
Cr-Commit-Position: refs/heads/master@{#14457}
diff --git a/webrtc/modules/video_coding/generic_decoder.cc b/webrtc/modules/video_coding/generic_decoder.cc
index ace8266..48bf237 100644
--- a/webrtc/modules/video_coding/generic_decoder.cc
+++ b/webrtc/modules/video_coding/generic_decoder.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/trace_event.h"
#include "webrtc/modules/video_coding/include/video_coding.h"
@@ -58,6 +59,7 @@
frameInfo = _timestampMap.Pop(decodedImage.timestamp());
callback = _receiveCallback;
}
+ RTC_DCHECK(callback != nullptr);
if (frameInfo == NULL) {
LOG(LS_WARNING) << "Too many frames backed up in the decoder, dropping "
@@ -73,11 +75,9 @@
_timing->StopDecodeTimer(decodedImage.timestamp(), decode_time_ms, now_ms,
frameInfo->renderTimeMs);
- if (callback != NULL) {
- decodedImage.set_render_time_ms(frameInfo->renderTimeMs);
- decodedImage.set_rotation(frameInfo->rotation);
- callback->FrameToRender(decodedImage);
- }
+ decodedImage.set_render_time_ms(frameInfo->renderTimeMs);
+ decodedImage.set_rotation(frameInfo->rotation);
+ callback->FrameToRender(decodedImage);
return WEBRTC_VIDEO_CODEC_OK;
}