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

Unified Diff: content/renderer/media/gpu/rtc_video_decoder.cc

Issue 2532953009: RtcVideoDecoder: do not fallback to software when getting size 0x0 keyframe. (Closed)
Patch Set: do not use keyframe to decide if a frame has size Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/gpu/rtc_video_decoder.cc
diff --git a/content/renderer/media/gpu/rtc_video_decoder.cc b/content/renderer/media/gpu/rtc_video_decoder.cc
index 34100350450ce27ad8cc96b21735b6c27a264f01..5e00fb1ba455f0115fe976e0e03f40113c3ec0a8 100644
--- a/content/renderer/media/gpu/rtc_video_decoder.cc
+++ b/content/renderer/media/gpu/rtc_video_decoder.cc
@@ -210,10 +210,10 @@ int32_t RTCVideoDecoder::Decode(
#endif
bool need_to_reset_for_midstream_resize = false;
- if (inputImage._frameType == webrtc::kVideoFrameKey) {
- const gfx::Size new_frame_size(inputImage._encodedWidth,
- inputImage._encodedHeight);
- DVLOG(2) << "Got key frame. size=" << new_frame_size.ToString();
+ const gfx::Size new_frame_size(inputImage._encodedWidth,
+ inputImage._encodedHeight);
+ if (!new_frame_size.IsEmpty()) {
Pawel Osciak 2016/12/02 00:13:00 if (!new_frame_size.IsEmpty() && new_frame_size !=
wuchengli 2016/12/02 05:54:48 Done.
+ DVLOG(2) << "Got new size=" << new_frame_size.ToString();
if (new_frame_size.width() > max_resolution_.width() ||
new_frame_size.width() < min_resolution_.width() ||
@@ -237,7 +237,7 @@ int32_t RTCVideoDecoder::Decode(
// If we're are in an error condition, increase the counter.
vda_error_counter_ += vda_error_counter_ ? 1 : 0;
- DVLOG(1) << "The first frame should be a key frame. Drop this.";
+ DVLOG(1) << "The first frame should have resolution. Drop this.";
return WEBRTC_VIDEO_CODEC_ERROR;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698