[go: nahoru, domu]

No EOS frame in {Audio|Video}Decoder::OutputCB.

This is a follow-up CL of r276344.

Currently, when audio and video decoders receive an EOS buffer, they do the following in order:
1, Flush the codec, return all internally buffered frames through the OutputCB.
2, Return a EOS frame through the OutputCB.
3, Return the DecodeCB.

Since the DecoderStream knows when an input buffer is an EOS, when the DecodeCB is returned, DecoderStream knows that decoding has finished. Therefore, step (2) is redundant.

This CL drops step (2) which simplifies a lot of code.

BUG=385872

Review URL: https://codereview.chromium.org/339653003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278232 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/media/filters/decrypting_audio_decoder_unittest.cc b/media/filters/decrypting_audio_decoder_unittest.cc
index e0d1d643..8f187e1 100644
--- a/media/filters/decrypting_audio_decoder_unittest.cc
+++ b/media/filters/decrypting_audio_decoder_unittest.cc
@@ -59,10 +59,6 @@
     arg0.Run(param);
 }
 
-MATCHER(IsEndOfStream, "end of stream") {
-  return (arg->end_of_stream());
-}
-
 }  // namespace
 
 class DecryptingAudioDecoderTest : public testing::Test {
@@ -180,9 +176,7 @@
   // of stream state. This function must be called after
   // EnterNormalDecodingState() to work.
   void EnterEndOfStreamState() {
-    // The codec in the |decryptor_| will be flushed. We expect kDecodingDelay
-    // frames to be returned followed by a EOS frame.
-    EXPECT_CALL(*this, FrameReady(IsEndOfStream()));
+    // The codec in the |decryptor_| will be flushed.
     EXPECT_CALL(*this, FrameReady(decoded_frame_))
         .Times(kDecodingDelay);
     DecodeAndExpect(DecoderBuffer::CreateEOSBuffer(), AudioDecoder::kOk);