Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1019)

Unified Diff: media/cast/receiver/video_decoder.cc

Issue 506683002: Remove implicit conversions from scoped_refptr to T* in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cast/receiver/video_decoder.cc
diff --git a/media/cast/receiver/video_decoder.cc b/media/cast/receiver/video_decoder.cc
index f4de9c3b31869c040a56e6a072816752dc1bbd2e..2c7a9fddb86c6011235cff3d7e6b72f13ef97f4a 100644
--- a/media/cast/receiver/video_decoder.cc
+++ b/media/cast/receiver/video_decoder.cc
@@ -150,15 +150,15 @@ class VideoDecoder::Vp8Impl : public VideoDecoder::ImplBase {
CopyYPlane(image->planes[VPX_PLANE_Y],
image->stride[VPX_PLANE_Y],
image->d_h,
- decoded_frame);
+ decoded_frame.get());
CopyUPlane(image->planes[VPX_PLANE_U],
image->stride[VPX_PLANE_U],
(image->d_h + 1) / 2,
- decoded_frame);
+ decoded_frame.get());
CopyVPlane(image->planes[VPX_PLANE_V],
image->stride[VPX_PLANE_V],
(image->d_h + 1) / 2,
- decoded_frame);
+ decoded_frame.get());
return decoded_frame;
}
@@ -238,7 +238,7 @@ VideoDecoder::VideoDecoder(
VideoDecoder::~VideoDecoder() {}
CastInitializationStatus VideoDecoder::InitializationResult() const {
- if (impl_)
+ if (impl_.get())
return impl_->InitializationResult();
return STATUS_UNSUPPORTED_VIDEO_CODEC;
}
@@ -248,7 +248,8 @@ void VideoDecoder::DecodeFrame(
const DecodeFrameCallback& callback) {
DCHECK(encoded_frame.get());
DCHECK(!callback.is_null());
- if (!impl_ || impl_->InitializationResult() != STATUS_VIDEO_INITIALIZED) {
+ if (!impl_.get() ||
+ impl_->InitializationResult() != STATUS_VIDEO_INITIALIZED) {
callback.Run(make_scoped_refptr<VideoFrame>(NULL), false);
return;
}

Powered by Google App Engine
This is Rietveld 408576698