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

Unified Diff: media/filters/chunk_demuxer_unittest.cc

Issue 1966673002: media: Fix WebM keyframe detection in BlockGroup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add unit tests with keyframe verification Created 4 years, 7 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 | « no previous file | media/formats/webm/cluster_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer_unittest.cc
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc
index 11bb7a2b4f712c28e38c4a847e1c3235ef76a97e..db320ba00e0e5ea5a0afccbcc2b0e2beb0222b25 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -617,7 +617,8 @@ class ChunkDemuxerTest : public ::testing::Test {
} else {
cb.AddBlockGroup(blocks[i].track_number, blocks[i].timestamp_in_ms,
blocks[i].duration, blocks[i].flags,
- &data[0], data.size());
+ blocks[i].flags & kWebMFlagKeyframe, &data[0],
+ data.size());
}
} else {
cb.AddSimpleBlock(blocks[i].track_number, blocks[i].timestamp_in_ms,
@@ -1010,7 +1011,8 @@ class ChunkDemuxerTest : public ::testing::Test {
(flags & kWebMFlagKeyframe) != 0 ? kVP8Keyframe : kVP8Interframe;
int size = (flags & kWebMFlagKeyframe) != 0 ? sizeof(kVP8Keyframe) :
sizeof(kVP8Interframe);
- cb->AddBlockGroup(track_num, timecode, duration, flags, data, size);
+ cb->AddBlockGroup(track_num, timecode, duration, flags,
+ flags & kWebMFlagKeyframe, data, size);
}
std::unique_ptr<Cluster> GenerateCluster(int first_audio_timecode,
@@ -1096,7 +1098,8 @@ class ChunkDemuxerTest : public ::testing::Test {
kWebMFlagKeyframe);
} else {
cb.AddBlockGroup(track_number, timecode, block_duration,
- kWebMFlagKeyframe, &data[0], data.size());
+ kWebMFlagKeyframe, static_cast<bool>(kWebMFlagKeyframe),
+ &data[0], data.size());
}
return cb.Finish();
« no previous file with comments | « no previous file | media/formats/webm/cluster_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698