Chih-Yu Huang
authored
CCodecBufferChannel (CCBC) set the number of output slots to "output delay + kSmoothnessFactor". CCBC would pause sending input buffers to the component when all the output slots are filled by pending decoded buffers. If the available output buffers are exhausted at the output slots before CCBC pause sending input buffers, CCodec would treat this situation as timeout easily. This CL increases the number of output buffer more than the number of output slots to prevent this situation from happening. Note: CCodec measures the elapsed time between CCBC passes a input buffer to the component and the component returns the corresponding output buffer back to CCBC. If the elapsed time is greater than a threshold, then CCodec considers the component stop working. Bug: 184020290 Test: android.media.cts.VideoEncoderTest#testGoogH264Flex1080p Change-Id: I38502d77d247499f1fcc5b434f18ad5e6edbfcb9 (cherry picked from commit 5d06eade6f296b88eacb8619e04ba96a9e60deb7)