Update internal SW codecs to return unique_ptrs
TBR=stefan@webrtc.org Bug: webrtc:7925 Change-Id: I84239b071a2608d928f09b06809090eec5eafb14 Reviewed-on: https://webrtc-review.googlesource.com/21165 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20650}
This commit is contained in:
committed by
Commit Bot
parent
8f91f1ee71
commit
4fe6adc06a
@ -33,15 +33,15 @@ std::vector<SdpVideoFormat> InternalDecoderFactory::GetSupportedFormats()
|
||||
std::unique_ptr<VideoDecoder> InternalDecoderFactory::CreateVideoDecoder(
|
||||
const SdpVideoFormat& format) {
|
||||
if (cricket::CodecNamesEq(format.name, cricket::kVp8CodecName))
|
||||
return std::unique_ptr<VideoDecoder>(VP8Decoder::Create());
|
||||
return VP8Decoder::Create();
|
||||
|
||||
if (cricket::CodecNamesEq(format.name, cricket::kVp9CodecName)) {
|
||||
RTC_DCHECK(VP9Decoder::IsSupported());
|
||||
return std::unique_ptr<VideoDecoder>(VP9Decoder::Create());
|
||||
return VP9Decoder::Create();
|
||||
}
|
||||
|
||||
if (cricket::CodecNamesEq(format.name, cricket::kH264CodecName))
|
||||
return std::unique_ptr<VideoDecoder>(H264Decoder::Create());
|
||||
return H264Decoder::Create();
|
||||
|
||||
RTC_LOG(LS_ERROR) << "Trying to create decoder for unsupported format";
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user