summaryrefslogtreecommitdiff
path: root/libavformat/rtmpproto.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-18 03:01:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-18 03:01:35 +0200
commit178764e833b14513ca4aaffa83f3d8444759a6ee (patch)
tree16b7f47b3d55a7db7b8b234d9e757c8b19f960d7 /libavformat/rtmpproto.c
parente06263ef1e0e172b2c76070b3dc739411af08e82 (diff)
parentf4cd8b80b9cb2a9a4112d8abb1d3b93cd3b4e467 (diff)
Merge commit 'f4cd8b80b9cb2a9a4112d8abb1d3b93cd3b4e467'
* commit 'f4cd8b80b9cb2a9a4112d8abb1d3b93cd3b4e467': rtmpproto: Track last received timestamp Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r--libavformat/rtmpproto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index da6f0c51fd..9cb684e853 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -96,6 +96,7 @@ typedef struct RTMPContext {
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
+ 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
int has_video; ///< presence of video data
@@ -2399,6 +2400,10 @@ static int get_packet(URLContext *s, int for_header)
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) {
av_log(s, AV_LOG_DEBUG, "Sending bytes read report\n");