Optional: Use nullopt and implicit construction in /modules/video_coding
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. Bug: None Change-Id: Iedebf4dc56a973306e7d7e7649525879808dc72b Reviewed-on: https://webrtc-review.googlesource.com/23578 Commit-Queue: Oskar Sundbom <ossu@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20878}
This commit is contained in:
committed by
Commit Bot
parent
56d460902e
commit
6bd39025ec
@ -47,7 +47,7 @@ std::unique_ptr<VideoBitrateAllocator> CreateBitrateAllocator(
|
||||
rtc::Optional<size_t> GetMaxNaluLength(const EncodedImage& encoded_frame,
|
||||
const TestConfig& config) {
|
||||
if (config.codec_settings.codecType != kVideoCodecH264)
|
||||
return rtc::Optional<size_t>();
|
||||
return rtc::nullopt;
|
||||
|
||||
std::vector<webrtc::H264::NaluIndex> nalu_indices =
|
||||
webrtc::H264::FindNaluIndices(encoded_frame._buffer,
|
||||
@ -59,7 +59,7 @@ rtc::Optional<size_t> GetMaxNaluLength(const EncodedImage& encoded_frame,
|
||||
for (const webrtc::H264::NaluIndex& index : nalu_indices)
|
||||
max_length = std::max(max_length, index.payload_size);
|
||||
|
||||
return rtc::Optional<size_t>(max_length);
|
||||
return max_length;
|
||||
}
|
||||
|
||||
int GetElapsedTimeMicroseconds(int64_t start_ns, int64_t stop_ns) {
|
||||
|
||||
Reference in New Issue
Block a user