Browse Source

rtmp: Account for bytes_read wraparound

Servers seem to be happy to receive the wrapped-around value as long
as they receive a report, otherwise they timeout.

Initially reported and analyzed by Thomas Bernhard.
tags/n3.4
Luca Barbato 8 years ago
parent
commit
11e225db31
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/rtmpproto.c

+ 1
- 1
libavformat/rtmpproto.c View File

@@ -2416,7 +2416,7 @@ static int get_packet(URLContext *s, int for_header)
rt->last_timestamp = rpkt.timestamp;

rt->bytes_read += ret;
if (rt->bytes_read > rt->last_bytes_read + rt->client_report_size) {
if (rt->bytes_read - rt->last_bytes_read > rt->client_report_size) {
av_log(s, AV_LOG_DEBUG, "Sending bytes read report\n");
if ((ret = gen_bytes_read(s, rt, rpkt.timestamp + 1)) < 0)
return ret;


Loading…
Cancel
Save