google-code-export / red5

Automatically exported from code.google.com/p/red5
0 stars 0 forks source link

Streams transferring 2GB+ stop sending BytesRead reports #457

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run a stream that sends over 2GB of data
2. Observe the values sent from 'updateBytesRead' in RTMPConnection.java
3. After 2GB of data has been streamed, integer wraparound will cause 
(bytesRead >= nextBytesRead) to always return false

What is the expected output? What do you see instead?
It is expected that after 2GB of data has been sent, BytesRead values will 
wraparound to start counting from 0. Instead, values will cease to be sent.

What version of the product are you using? On what operating system?
Trunk, Linux.

Please provide any additional information below.

This issue is due to the use of int, rather than long, when tracking the next 
threshold to send a BytesRead report. Additionally, the cast of bytesRead to 
int should instead be a modulo on Integer.MAX_VALUE.

Please find a patch to fix this issue attached.

Original issue reported on code.google.com by nchadw...@brightcove.com on 30 Oct 2013 at 8:54

GoogleCodeExporter commented 9 years ago
Patch attached.

Original comment by nchadw...@brightcove.com on 30 Oct 2013 at 8:55

Attachments:

GoogleCodeExporter commented 9 years ago
Original version of this patch incorrectly passed a long to the constructor of 
BytesRead (what I get for cherry-picking the diffs). Please find a corrected 
version of the patch attached.

Original comment by nchadw...@brightcove.com on 31 Oct 2013 at 8:16

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by mondain on 31 Oct 2013 at 9:02

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r4730.

Original comment by mondain on 31 Oct 2013 at 11:09