Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: webrtc/modules/video_coding/generic_decoder.cc

Issue 2389703002: Change DCHECK in VCMDecodedFrameCallback back to just logging. (Closed)
Patch Set: Address comments. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/generic_decoder.cc
diff --git a/webrtc/modules/video_coding/generic_decoder.cc b/webrtc/modules/video_coding/generic_decoder.cc
index 48bf237996a9e6501405f3bad8cd30b716718493..b95571b8f73793718d318eedc82fff249e9a9f17 100644
--- a/webrtc/modules/video_coding/generic_decoder.cc
+++ b/webrtc/modules/video_coding/generic_decoder.cc
@@ -59,7 +59,6 @@ int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
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 "
@@ -77,7 +76,13 @@ int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
decodedImage.set_render_time_ms(frameInfo->renderTimeMs);
decodedImage.set_rotation(frameInfo->rotation);
- callback->FrameToRender(decodedImage);
+ // TODO(sakal): Investigate why callback is NULL sometimes and replace if
+ // statement with a DCHECK.
+ if (callback) {
+ callback->FrameToRender(decodedImage);
+ } else {
+ LOG(LS_WARNING) << "No callback, dropping frame.";
+ }
return WEBRTC_VIDEO_CODEC_OK;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698