Optional: Use nullopt and implicit construction in /modules/video_coding/codecs/h264

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 <sprang@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20955}
This commit is contained in:
Oskar Sundbom
2017-11-16 10:55:37 +01:00
committed by Commit Bot
parent 1bec1b497c
commit 3808709afd

View File

@ -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<int32_t>(),
qp);
decoded_image_callback_->Decoded(cropped_frame, rtc::nullopt, qp);
} else {
// Return decoded frame.
decoded_image_callback_->Decoded(*video_frame, rtc::Optional<int32_t>(),
qp);
decoded_image_callback_->Decoded(*video_frame, rtc::nullopt, qp);
}
// Stop referencing it, possibly freeing |video_frame|.
av_frame_unref(av_frame_.get());