diff mbox

[FFmpeg-devel] lavf/rtmpproto: Make bytes_read variables 64bit.

Message ID 201701141922.01423.cehoyos@ag.or.at
State Accepted
Commit 75bd4ea02400ffa5fa95569a9cf3213c64e651fb
Headers show

Commit Message

Carl Eugen Hoyos Jan. 14, 2017, 6:22 p.m. UTC
Hi!

Attached patch is meant to fix ticket #5836, completely untested.

Please comment, Carl Eugen
From b6d895a9bf1a4ed9d1660d99043b8edc5cc8b169 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos@ag.or.at>
Date: Sat, 14 Jan 2017 19:17:09 +0100
Subject: [PATCH] lavf/rtmpproto: Make bytes_read variables 64bit.

When bytes_read overflowed, last_bytes_read did not yet overflow
and no bytes-read report was created leading to a timeout.

Analyzed-by: Thomas Bernhard

Fixes ticket #5836.
---
 libavformat/rtmpproto.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Carl Eugen Hoyos Jan. 24, 2017, 11:45 p.m. UTC | #1
2017-01-14 19:22 GMT+01:00 Carl Eugen Hoyos <cehoyos@ag.or.at>:

> Attached patch is meant to fix ticket #5836, completely untested.

Patch applied.

Carl Eugen
diff mbox

Patch

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index b118b4e..5d7ad79 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -94,8 +94,8 @@  typedef struct RTMPContext {
     int           flv_nb_packets;             ///< number of flv packets published
     RTMPPacket    out_pkt;                    ///< rtmp packet, created from flv a/v or metadata (for output)
     uint32_t      client_report_size;         ///< number of bytes after which client should report to server
-    uint32_t      bytes_read;                 ///< number of bytes read from server
-    uint32_t      last_bytes_read;            ///< number of bytes read last reported to server
+    uint64_t      bytes_read;                 ///< number of bytes read from server
+    uint64_t      last_bytes_read;            ///< number of bytes read last reported to server
     uint32_t      last_timestamp;             ///< last timestamp received in a packet
     int           skip_bytes;                 ///< number of bytes to skip from the input FLV stream in the next write call
     int           has_audio;                  ///< presence of audio data