-
- // Classes allocated in stack are automatically destroyed.
-}
-
-TEST_F(H264ToAnnexBBitstreamConverterTest, FailureNullData) {
- // Initialize converter.
- H264ToAnnexBBitstreamConverter converter;
-
- // Simulate situation where there is no header data.
- uint32 config_size = converter.ParseConfigurationAndCalculateSize(NULL, 0);
- EXPECT_EQ(config_size, 0U);
-
- // Go on with converting the headers with NULL parameters.
- EXPECT_FALSE(converter.ConvertAVCDecoderConfigToByteStream(NULL,
- 0,
- NULL,
- &config_size));
-
- // Simulate NULL parameters for buffer calculation.
- uint32 output_size = converter.CalculateNeededOutputBufferSize(NULL, 0);
- EXPECT_EQ(output_size, 0U);
-
- // Do the conversion for actual NAL unit with NULL paramaters.
- EXPECT_FALSE(converter.ConvertNalUnitStreamToByteStream(NULL,
- 0,
- NULL,
- &output_size));
-
- // Classes allocated in stack are automatically destroyed.