Hi, I am trying to inject a byte array as AMF data into my stream, I get this message:
AMFDataByteArray.deserialize[15400:4] : java.lang.NegativeArraySizeException|at com.wowza.wms.amf.AMFDataByteArray.deserialize(AMFDataByteArray.java:175)|at com.wowza.wms.amf.AMFDataByteArray.<init>(AMFDataByteArray.java:83)|a
I use this to create the AMFDataByteArray and I know the dataBytes array is 15400 bytes:
AMFDataContextDeserialize amf3Context = new AMFDataContextDeserialize();
amf3Context.setObjectEncoding(AMFDataObj.AMF_LEVEL3);
AMFDataByteArray amfByteData = new AMFDataByteArray(ByteBuffer.wrap(dataBytes), amf3Context);
I am not sure what to do here.
. Also which function do I used to inject this into the stream?
stream.sendDirect("onDataFunction", amfData);
or
stream.sendDirectAMF3("onDataFunction", amfData);
??