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

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

Issue 892383002: RELAND: [Cast] Software encoder support for varying video frame sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for 'access to uninitialized memory' error. Created 5 years, 11 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
« no previous file with comments | « media/cast/sender/fake_software_video_encoder.h ('k') | media/cast/sender/h264_vt_encoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/fake_software_video_encoder.cc
diff --git a/media/cast/sender/fake_software_video_encoder.cc b/media/cast/sender/fake_software_video_encoder.cc
index 12b6b775efce0b52db7cb15ae8ddfe94092ab1db..7a2a333153e11eaa34b67ad93e44c335040627d9 100644
--- a/media/cast/sender/fake_software_video_encoder.cc
+++ b/media/cast/sender/fake_software_video_encoder.cc
@@ -33,6 +33,11 @@ void FakeSoftwareVideoEncoder::Encode(
EncodedFrame* encoded_frame) {
DCHECK(encoded_frame);
+ if (video_frame->visible_rect().size() != last_frame_size_) {
+ next_frame_is_key_ = true;
+ last_frame_size_ = video_frame->visible_rect().size();
+ }
+
encoded_frame->frame_id = frame_id_++;
if (next_frame_is_key_) {
encoded_frame->dependency = EncodedFrame::KEY;
« no previous file with comments | « media/cast/sender/fake_software_video_encoder.h ('k') | media/cast/sender/h264_vt_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698