[FFmpeg-cvslog] rtmpproto: make condition work in overflow case.

Reimar Döffinger git at videolan.org
Sat Dec 10 19:35:35 CET 2011


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sat Dec 10 15:52:21 2011 +0100| [0849a0ebb2c94856c3a94cb114a1412e44904c28] | committer: Reimar Döffinger

rtmpproto: make condition work in overflow case.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0849a0ebb2c94856c3a94cb114a1412e44904c28
---

 libavformat/rtmpproto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 486e9a3..8aec9f3 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -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;



More information about the ffmpeg-cvslog mailing list