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

Unified Diff: media/formats/mp2t/mp2t_stream_parser_unittest.cc

Issue 364823008: Mpeg2TS - estimate duration for video frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments. Created 6 years, 5 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: media/formats/mp2t/mp2t_stream_parser_unittest.cc
diff --git a/media/formats/mp2t/mp2t_stream_parser_unittest.cc b/media/formats/mp2t/mp2t_stream_parser_unittest.cc
index 1f329862859044c7c5d5ac631e50fb6d48e6a16d..56fbd20baceb5c3e0a821abdc24108c473ed83de 100644
--- a/media/formats/mp2t/mp2t_stream_parser_unittest.cc
+++ b/media/formats/mp2t/mp2t_stream_parser_unittest.cc
@@ -160,7 +160,6 @@ TEST_F(Mp2tStreamParserTest, UnalignedAppend17) {
// Test small, non-segment-aligned appends.
InitializeParser();
ParseMpeg2TsFile("bear-1280x720.ts", 17);
- EXPECT_EQ(video_frame_count_, 81);
parser_->Flush();
wolenetz 2014/07/10 17:57:23 Prior to Flush(), is there a non-flaky |video_fram
damienv1 2014/07/10 18:34:52 This all depends on the latency we introduce in th
EXPECT_EQ(video_frame_count_, 82);
}
@@ -169,7 +168,6 @@ TEST_F(Mp2tStreamParserTest, UnalignedAppend512) {
// Test small, non-segment-aligned appends.
InitializeParser();
ParseMpeg2TsFile("bear-1280x720.ts", 512);
- EXPECT_EQ(video_frame_count_, 81);
parser_->Flush();
wolenetz 2014/07/10 17:57:23 ditto
damienv1 2014/07/10 18:34:52 Same answer. May be I could consider sth like: EX
EXPECT_EQ(video_frame_count_, 82);
}
@@ -190,7 +188,8 @@ TEST_F(Mp2tStreamParserTest, TimestampWrapAround) {
// in the Mpeg2 TS stream.
InitializeParser();
ParseMpeg2TsFile("bear-1280x720_ptswraparound.ts", 512);
- EXPECT_EQ(video_frame_count_, 81);
+ parser_->Flush();
wolenetz 2014/07/10 17:57:23 ditto
damienv1 2014/07/10 18:34:52 Done.
+ EXPECT_EQ(video_frame_count_, 82);
EXPECT_GE(video_min_dts_, base::TimeDelta::FromSeconds(95443 - 10));
EXPECT_LE(video_max_dts_, base::TimeDelta::FromSeconds(95443 + 10));
}

Powered by Google App Engine
This is Rietveld 408576698