[FFmpeg-trac] #5836(undetermined:new): RTMP cannot receive live stream more than 4GB

FFmpeg trac at avcodec.org
Thu Jan 12 12:54:59 EET 2017


#5836: RTMP cannot receive live stream more than 4GB
-------------------------------------+-------------------------------------
             Reporter:  tyama        |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:  rtmp         |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by iluvatar):

 I had the same issue.
 In my case following code fix it:

 {{{
 diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
 index 72d6341..58f5994 100644
 --- a/libavformat/rtmpproto.c
 +++ b/libavformat/rtmpproto.c
 @@ -2432,6 +2432,10 @@ static int get_packet(URLContext *s, int
 for_header)
          rt->last_timestamp = rpkt.timestamp;

          rt->bytes_read += ret;
 +        if (rt->bytes_read > 0xF0000000) {
 +            rt->bytes_read -= 0xF0000000;
 +            rt->last_bytes_read -= 0xF0000000;
 +        }
          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)
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5836#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list