On Wed, 25 Jan 2017, Luca Barbato wrote:

The servers seem to be happy to receive the wrapped around value as long
they receive a report, otherwise they would timeout.

Initially reported and analyzed by Thomas Bernhard.
---

Here the alternative patch discussed on IRC.

libavformat/rtmpproto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 5298c18..49a40dd 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -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;
--
2.9.2

Seems ok to me, although I'm not able to test the issue easily.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to