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

Unified Diff: content/common/gpu/media/vaapi_video_encode_accelerator.cc

Issue 686283002: Vaapi VEA: always generate IDR when keyframe is requested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unittest. Created 6 years, 2 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: content/common/gpu/media/vaapi_video_encode_accelerator.cc
diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
index 14ffe34355012f74e4ce4e72c13f24ae8b915b7a..ca15064e45b053244b7f8cfd91f1c762ae8ca3d9 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -291,7 +291,7 @@ void VaapiVideoEncodeAccelerator::BeginFrame(bool force_keyframe) {
else
current_pic_.type = media::H264SliceHeader::kPSlice;
- if (current_pic_.frame_num % idr_period_ == 0) {
+ if (current_pic_.frame_num % idr_period_ == 0 || force_keyframe) {
current_pic_.idr = true;
last_idr_frame_num_ = current_pic_.frame_num;
ref_pic_list0_.clear();

Powered by Google App Engine
This is Rietveld 408576698