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

Unified Diff: media/filters/video_frame_stream_unittest.cc

Issue 2841553003: media: Discard the previous decoder immediately on fallback (Closed)
Patch Set: Remove out of date comments Created 3 years, 8 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/filters/video_frame_stream_unittest.cc
diff --git a/media/filters/video_frame_stream_unittest.cc b/media/filters/video_frame_stream_unittest.cc
index c82dadd2ae743c88422cba1541d5be6ee23b49b3..0f6752d7dc3825754fcfbd9bdf277f92758579e1 100644
--- a/media/filters/video_frame_stream_unittest.cc
+++ b/media/filters/video_frame_stream_unittest.cc
@@ -977,7 +977,6 @@ TEST_P(VideoFrameStreamTest, FallbackDecoder_PendingBuffersIsFilledAndCleared) {
EXPECT_EQ(0, video_frame_stream_->get_fallback_buffers_size_for_testing());
EXPECT_EQ(demuxer_reads_satisfied,
video_frame_stream_->get_pending_buffers_size_for_testing());
- EXPECT_EQ(video_frame_stream_->get_previous_decoder_for_testing(), decoder1_);
EXPECT_TRUE(pending_read_);
// Give the decoder one more buffer, enough to release a frame.
@@ -1083,15 +1082,9 @@ TEST_P(VideoFrameStreamTest, DecoderErrorWhenNotReading) {
TEST_P(VideoFrameStreamTest, FallbackDecoderSelectedOnFailureToReinitialize) {
Initialize();
decoder1_->SimulateFailureToInit();
- // Holding decode, because large decoder delays might cause us to get rid of
- // |previous_decoder_| before we are in a pending state again.
- decoder2_->HoldDecode();
ReadUntilDecoderReinitialized(decoder1_);
- ASSERT_TRUE(video_frame_stream_->get_previous_decoder_for_testing());
- decoder2_->SatisfyDecode();
- base::RunLoop().RunUntilIdle();
ReadAllFrames();
- ASSERT_FALSE(video_frame_stream_->get_previous_decoder_for_testing());
+ ASSERT_GT(decoder2_->total_bytes_decoded(), 0);
}
TEST_P(VideoFrameStreamTest,

Powered by Google App Engine
This is Rietveld 408576698