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

Unified Diff: media/cast/sender/size_adaptable_video_encoder_base.cc

Issue 1913503002: Memory copy the VideoFrame to match the requirement for HW encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 7 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/sender/size_adaptable_video_encoder_base.cc
diff --git a/media/cast/sender/size_adaptable_video_encoder_base.cc b/media/cast/sender/size_adaptable_video_encoder_base.cc
index 0a7c323244d7a7345a12b3434ddd7e602352172e..a803347f6dd9da24359fc0fc48f6d06690808f16 100644
--- a/media/cast/sender/size_adaptable_video_encoder_base.cc
+++ b/media/cast/sender/size_adaptable_video_encoder_base.cc
@@ -156,7 +156,9 @@ void SizeAdaptableVideoEncoderBase::OnEncodedVideoFrame(
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
--frames_in_encoder_;
DCHECK_GE(frames_in_encoder_, 0);
- next_frame_id_ = encoded_frame->frame_id + 1;
+
+ if (encoded_frame)
+ next_frame_id_ = encoded_frame->frame_id + 1;
frame_encoded_callback.Run(std::move(encoded_frame));
}

Powered by Google App Engine
This is Rietveld 408576698