Missed the SPS replay code when fixing the Annex B escape sequence issues

This commit is contained in:
Cameron Gutman 2015-11-20 18:57:23 -08:00
parent 92f24d20db
commit a7d4a04ac2

View File

@ -628,8 +628,10 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
// Patch the SPS constraint flags
doProfileSpecificSpsPatching(savedSps);
// Write the SPS data
savedSps.write(inputBuffer);
// The H264Utils.writeSPS function safely handles
// Annex B NALUs (including NALUs with escape sequences)
ByteBuffer escapedNalu = H264Utils.writeSPS(savedSps, 128);
inputBuffer.put(escapedNalu);
// No need for the SPS anymore
savedSps = null;