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 34500c69e2a39f9b69b0e2488318ce75ee0e370f..b1059e8a1b6997a378b85400d57860a5b7cdf878 100644 |
--- a/webrtc/modules/video_coding/generic_decoder.cc |
+++ b/webrtc/modules/video_coding/generic_decoder.cc |
@@ -48,16 +48,6 @@ int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage) { |
int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage, |
int64_t decode_time_ms) { |
- Decoded(decodedImage, |
- decode_time_ms >= 0 ? rtc::Optional<int32_t>(decode_time_ms) |
- : rtc::Optional<int32_t>(), |
- rtc::Optional<uint8_t>()); |
- return WEBRTC_VIDEO_CODEC_OK; |
-} |
- |
-void VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage, |
- rtc::Optional<int32_t> decode_time_ms, |
- rtc::Optional<uint8_t> qp) { |
TRACE_EVENT_INSTANT1("webrtc", "VCMDecodedFrameCallback::Decoded", |
"timestamp", decodedImage.timestamp()); |
// TODO(holmer): We should improve this so that we can handle multiple |
@@ -73,15 +63,15 @@ void VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage, |
if (frameInfo == NULL) { |
LOG(LS_WARNING) << "Too many frames backed up in the decoder, dropping " |
"this one."; |
- return; |
+ return WEBRTC_VIDEO_CODEC_OK; |
} |
const int64_t now_ms = _clock->TimeInMilliseconds(); |
- if (!decode_time_ms) { |
+ if (decode_time_ms < 0) { |
decode_time_ms = |
- rtc::Optional<int32_t>(now_ms - frameInfo->decodeStartTimeMs); |
+ static_cast<int32_t>(now_ms - frameInfo->decodeStartTimeMs); |
} |
- _timing->StopDecodeTimer(decodedImage.timestamp(), *decode_time_ms, now_ms, |
+ _timing->StopDecodeTimer(decodedImage.timestamp(), decode_time_ms, now_ms, |
frameInfo->renderTimeMs); |
decodedImage.set_timestamp_us( |
@@ -90,10 +80,11 @@ void VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage, |
// TODO(sakal): Investigate why callback is NULL sometimes and replace if |
// statement with a DCHECK. |
if (callback) { |
- callback->FrameToRender(decodedImage, qp); |
+ callback->FrameToRender(decodedImage); |
} else { |
LOG(LS_WARNING) << "No callback, dropping frame."; |
} |
+ return WEBRTC_VIDEO_CODEC_OK; |
} |
int32_t VCMDecodedFrameCallback::ReceivedDecodedReferenceFrame( |