From 3808709afdd7ebb4f1e93f4a4d144c12fd0569e8 Mon Sep 17 00:00:00 2001 From: Oskar Sundbom Date: Thu, 16 Nov 2017 10:55:37 +0100 Subject: [PATCH] Optional: Use nullopt and implicit construction in /modules/video_coding/codecs/h264 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes places where we explicitly construct an Optional to instead use nullopt or the requisite value type only. This CL was uploaded by git cl split. R=sprang@webrtc.org Bug: None Change-Id: Ic429f28a8610ca798e29c45ec1f64604d6f9687f Reviewed-on: https://webrtc-review.googlesource.com/23603 Reviewed-by: Erik Språng Commit-Queue: Oskar Sundbom Cr-Commit-Position: refs/heads/master@{#20955} --- modules/video_coding/codecs/h264/h264_decoder_impl.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/modules/video_coding/codecs/h264/h264_decoder_impl.cc index 5f6b0c9765..f058e70bd9 100644 --- a/modules/video_coding/codecs/h264/h264_decoder_impl.cc +++ b/modules/video_coding/codecs/h264/h264_decoder_impl.cc @@ -377,12 +377,10 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, video_frame->rotation()); // TODO(nisse): Timestamp and rotation are all zero here. Change decoder // interface to pass a VideoFrameBuffer instead of a VideoFrame? - decoded_image_callback_->Decoded(cropped_frame, rtc::Optional(), - qp); + decoded_image_callback_->Decoded(cropped_frame, rtc::nullopt, qp); } else { // Return decoded frame. - decoded_image_callback_->Decoded(*video_frame, rtc::Optional(), - qp); + decoded_image_callback_->Decoded(*video_frame, rtc::nullopt, qp); } // Stop referencing it, possibly freeing |video_frame|. av_frame_unref(av_frame_.get());