mirror of https://git.ffmpeg.org/ffmpeg.git
rtmpproto: Add a comment explaining the logic in handle_notify
This explains why the cleanup in5626f994f
was wrong and whyae0f316a
was needed. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
e5d45e028c
commit
b97b1adb3f
|
@ -2095,9 +2095,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;
|
||||
|
|
Loading…
Reference in New Issue