Stream transcoding twice?

inside of onHttpSessionCreate I’m starting a stream. This, for some reason, spins up two Transcoder instances instead of just one. Why?

Logs starting from onAppStart:

INFO application app-start _definst_ live/_definst_
INFO server comment - onStreamCreate: 1
INFO cupertino connect 547595022 -
INFO stream create video -
INFO stream create - -
onPublish[live/_definst_/video]: isRecord:false isAppend:false
INFO stream publish video -
INFO server comment - Stream.switch[live/_definst_/video]: index: 0 name:sample.mp4 start:0 length:-1
onMetaData[live/_definst_/video]: {AMFPacket: size: 581,  type: 18,  src: 0,  seq: 0,  absTimecode: 0,  timecode: 0}
INFO server comment - TranscoderSessionNative.loadLibrary: Load transcoder list file: C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.5.0\lib-native\win64\transcoder.list
INFO server comment - LiveStreamTranscoder.init[live/_definst_/video]: Load transcoder template: file:///C:/Program Files (x86)/Wowza Media Systems/Wowza Streaming Engine 4.5.0/transcoder/templates/audioonly.xml
WARN server comment - LiveReceiver.startDataPacket[live/_definst_/video]: Data packet sync issue.
INFO server comment - LiveStreamTranscoder.init[live/_definst_/video]: Load transcoder template: file:///C:/Program Files (x86)/Wowza Media Systems/Wowza Streaming Engine 4.5.0/transcoder/templates/audioonly.xml
INFO server comment - JNI:VideoEncoderH265QuickSyncHost.isAvailable[global]: {Process: processId:6316 sessionId:2 sessionStatus:1} {QSAPIVersion:1.16}
INFO server comment - JNI:TranscoderSession.isCUDAAvailable[_defaultVHost_:live/_definst_/video]:NVidia hardware acceleration is available: NVENC5[H264], NVCUVID, CUDA[decode]
INFO server comment - JNI:NVidiaCUDAUtils.logCUDAGPUInfo[_defaultVHost_:live/_definst_/video]: GPU[0]: name:"GeForce GTX 960M" computeCapability:5.0 cudaVersion:7050 driverVersion:353.62 memory:2048MB processors:5 cores:640 clockRate:1176MHz
INFO server comment - JNI:TranscoderSession.isQuickSyncAvailable[_defaultVHost_:live/_definst_/video]: Intel Quick Sync hardware acceleration is available: ENC[H264], DEC[H264], DEC[MP2], version:1.16
INFO stream create - -
onPublish[live/_definst_/audio]: isRecord:false isAppend:false
INFO stream publish audio -
onCodecInfoAudio[live/_definst_/video Audio Codecmp4a.40.2]: 
onCodecInfoVideo[live/_definst_/video Video Codecavc1.42c015]: 
INFO server comment - TranscoderWorkerVideoDecoder.handlePacket[_defaultVHost_:live/_definst_/video: decodeIterations:0]: First codecConfig frame: {MediaCodecInfoVideo: codec:H264, profile:Baseline, level:2.1, frameSize:512x288, displaySize:512x288, frameRate:30.000000}
INFO server comment - LiveStreamPacketizerCupertino.init[live/_definst_/video]: chunkDurationTarget: 2000
INFO server comment - LiveStreamPacketizerCupertino.init[live/_definst_/video]: audioGroupCount: 3
INFO server comment - LiveStreamPacketizerCupertino.init[live/_definst_/video]: playlistChunkCount:2
INFO server comment - MediaStreamMap.getLiveStreamPacketizer[live/_definst_/video]: Create live stream packetizer: cupertinostreamingpacketizer:video
INFO server comment - CupertinoPacketHandler.startStream[live/_definst_/video]
INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/_definst_/video]: Video codec:H264 isCompatible:true
INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/_definst_/video]: Audio codec:AAC isCompatible:true
INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/_definst_/video][mp4a.40.2]: AAC Audio info: {AACFrame: codec:AAC, channels:2, frequency:48000, samplesPerFrame:1024, objectType:LC}
INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/_definst_/video][avc1.66.21]: H.264 Video info: {H264CodecConfigInfo: codec:H264, profile:Baseline, level:2.1, frameSize:512x288, displaySize:512x288, frameRate:30.0, PAR:1:1}
INFO server comment - JNI:VideoEncoderH265QuickSyncHost.isAvailable[global]: {Process: processId:6316 sessionId:2 sessionStatus:1} {QSAPIVersion:1.16}
INFO server comment - JNI:TranscoderSession.isCUDAAvailable[_defaultVHost_:live/_definst_/video]:NVidia hardware acceleration is available: NVENC5[H264], NVCUVID, CUDA[decode]
INFO server comment - JNI:NVidiaCUDAUtils.logCUDAGPUInfo[_defaultVHost_:live/_definst_/video]: GPU[0]: name:"GeForce GTX 960M" computeCapability:5.0 cudaVersion:7050 driverVersion:353.62 memory:2048MB processors:5 cores:640 clockRate:1176MHz
INFO server comment - JNI:TranscoderSession.isQuickSyncAvailable[_defaultVHost_:live/_definst_/video]: Intel Quick Sync hardware acceleration is available: ENC[H264], DEC[H264], DEC[MP2], version:1.16
WARN server comment - Licensing[live/_definst_/video]: *** Hit license limit for live stream transcoders. Live stream transcoder is stopped. ***
INFO server comment - TranscodingSession.shutdown[live/_definst_/video]

It turns out that this was because I was adding metadata immediately after calling stream.play()

public void injectMetaData(IMediaStream stream, String header, String key, String value)
		{
			try{
				if (stream != null)
				{
					AMFDataList amfList = new AMFDataList();
					
					amfList.add(new AMFDataItem("@setDataFrame"));
					amfList.add(new AMFDataItem("onTextData"));
					
					AMFDataObj metaData = new AMFDataObj();
					
					metaData.put("header", header);
					metaData.put("key", key);
					metaData.put("value", value);
					
					amfList.add(metaData);
					
					synchronized(stream)
				    {
						byte[] dataData = amfList.serialize();
						int size = dataData.length;
			            long timecode = Math.max(stream.getAudioTC(), stream.getVideoTC());
			            stream.setDataTC(timecode);
			            stream.setDataSize(size);
			            stream.startDataPacket();
			            stream.addDataData(dataData, 0, size);
				    }
				}
			}catch(Exception e){
				e.printStackTrace();
			}
		}

I suspect that trying to send a data packet before everything had finished spinning up caused a problem. Delaying this function by a second solved it.