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

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: fix the test 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 | content/renderer/media/gpu/rtc_video_decoder_unittest.cc » ('j') | 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..929ab573190287b89f8bdc56b5fdab8f90fa2415 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() && new_frame_size != frame_size_) {
+ 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 | content/renderer/media/gpu/rtc_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698