red5-client icon indicating copy to clipboard operation
red5-client copied to clipboard

BaseRTMPClientHandler.onChunkSize:Don't update writeChunkSize

Open rawler opened this issue 2 years ago • 3 comments

The RTMP specification states clearly, that "The maximum chunk size is maintained independently for each direction". That means that our peer updating its chunkSize, does not affect our outgoing chunkSize. A change in writeChunkSize must be accompanied by a SetChunkSize message of our own, otherwise our peer have no reliable way to know what chunksize to use for each message.

https://rtmp.veriskope.com/docs/spec/?#541set-chunk-size-1

rawler avatar May 03 '22 12:05 rawler

Some context; I've been struggling to get red5 working with another RTMP implementation. After digging around, it seems like the problem is that if SetChunkSize happens to be received by the client before sending the connect call, the connect call will be chunked using the chunk-size set by the peer, while the peer expects "our" (default) chunksize to be used.

rawler avatar May 03 '22 12:05 rawler

@mondain Any chance to have a look at this?

rawler avatar May 11 '22 09:05 rawler

@rawler thanks for the patch, I'll do a review / test and see about adding it as soon as I can. Also be aware that the on-going development of Red5 client is moved to the red5-server repo; the server project has been modularized instead of staying in separate repos.

mondain avatar May 11 '22 13:05 mondain