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

Unified Diff: content/common/gpu/media/video_encode_accelerator_unittest.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
« no previous file with comments | « content/common/gpu/media/vaapi_video_encode_accelerator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/video_encode_accelerator_unittest.cc
diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc
index c4c6339d309a035da5ec61ff459ad4baa1769215..32eb160789320ac6d4d5946280fa12ecbca3e9bf 100644
--- a/content/common/gpu/media/video_encode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
@@ -392,7 +392,11 @@ void H264Validator::ProcessStreamBuffer(const uint8* stream, size_t size) {
media::H264SliceHeader shdr;
ASSERT_EQ(media::H264Parser::kOk,
h264_parser_.ParseSliceHeader(nalu, &shdr));
- keyframe = shdr.IsISlice() || shdr.IsSISlice();
+
+ if (nalu.nal_unit_type == media::H264NALU::kIDRSlice) {
+ ASSERT_TRUE(shdr.IsISlice() || shdr.IsSISlice());
+ keyframe = true;
Pawel Osciak 2014/10/30 01:38:33 Please instead move keyframe = true to the case ab
hshi1 2014/10/30 03:48:25 Done.
+ }
if (!frame_cb_.Run(keyframe))
return;
« no previous file with comments | « content/common/gpu/media/vaapi_video_encode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698