summaryrefslogtreecommitdiff
path: root/libavformat/rtmpproto.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-20 15:30:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-20 15:30:51 +0200
commit391e272c163723a48609f1794f76064018847c0d (patch)
tree6d4bb12c58b81ac8337f4c4cdf20190579b561ef /libavformat/rtmpproto.c
parent2be92abac7f32f981671ce47f05cfcee7599bdd9 (diff)
parentb97b1adb3f807e1acd00d56319ee6cb41cc727e4 (diff)
Merge commit 'b97b1adb3f807e1acd00d56319ee6cb41cc727e4'
* commit 'b97b1adb3f807e1acd00d56319ee6cb41cc727e4': rtmpproto: Add a comment explaining the logic in handle_notify Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r--libavformat/rtmpproto.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 020f76ff2d..fca29b6ff3 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -2092,9 +2092,11 @@ static int handle_notify(URLContext *s, RTMPPacket *pkt) {
// generate packet header and put data into buffer for FLV demuxer
if (rt->flv_off < rt->flv_size) {
+ // There is old unread data in the buffer, thus append at the end
old_flv_size = rt->flv_size;
rt->flv_size += datatowritelength + 15;
} else {
+ // All data has been read, write the new data at the start of the buffer
old_flv_size = 0;
rt->flv_size = datatowritelength + 15;
rt->flv_off = 0;