rtmpproto: make condition work in overflow case.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 10 Dec 2011 14:52:21 +0000 (15:52 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 10 Dec 2011 18:34:28 +0000 (19:34 +0100)
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libavformat/rtmpproto.c

index 486e9a3..8aec9f3 100644 (file)
@@ -700,7 +700,7 @@ static int get_packet(URLContext *s, int for_header)
             }
         }
         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");
             gen_bytes_read(s, rt, rpkt.timestamp + 1);
             rt->last_bytes_read = rt->bytes_read;