Merge commit 'b97b1adb3f807e1acd00d56319ee6cb41cc727e4'
* commit 'b97b1adb3f807e1acd00d56319ee6cb41cc727e4': rtmpproto: Add a comment explaining the logic in handle_notify Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
391e272c16
@ -2092,9 +2092,11 @@ static int handle_notify(URLContext *s, RTMPPacket *pkt) {
|
|||||||
|
|
||||||
// generate packet header and put data into buffer for FLV demuxer
|
// generate packet header and put data into buffer for FLV demuxer
|
||||||
if (rt->flv_off < rt->flv_size) {
|
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;
|
old_flv_size = rt->flv_size;
|
||||||
rt->flv_size += datatowritelength + 15;
|
rt->flv_size += datatowritelength + 15;
|
||||||
} else {
|
} else {
|
||||||
|
// All data has been read, write the new data at the start of the buffer
|
||||||
old_flv_size = 0;
|
old_flv_size = 0;
|
||||||
rt->flv_size = datatowritelength + 15;
|
rt->flv_size = datatowritelength + 15;
|
||||||
rt->flv_off = 0;
|
rt->flv_off = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user