Merge commit 'f4cd8b80b9cb2a9a4112d8abb1d3b93cd3b4e467'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 18 Oct 2014 01:01:31 +0000 (03:01 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 18 Oct 2014 01:01:35 +0000 (03:01 +0200)
* commit 'f4cd8b80b9cb2a9a4112d8abb1d3b93cd3b4e467':
  rtmpproto: Track last received timestamp

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/rtmpproto.c

@@@ -2399,8 -2397,12 +2400,12 @@@ static int get_packet(URLContext *s, in
                  return AVERROR(EIO);
              }
          }
+         // Track timestamp for later use
+         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;