网战录像流强行将每段数据长度补足到3的倍数保证base64后的数据不会被等号填充
This commit is contained in:
@@ -239,13 +239,17 @@ function scene.update(dt)
|
|||||||
--Upload stream
|
--Upload stream
|
||||||
if P1.frameRun-lastUpstreamTime>8 then
|
if P1.frameRun-lastUpstreamTime>8 then
|
||||||
local stream
|
local stream
|
||||||
stream,upstreamProgress=DATA.dumpRecording(GAME.rep,upstreamProgress)
|
if not GAME.rep[upstreamProgress]then
|
||||||
if #stream>0 then
|
|
||||||
NET.uploadRecStream(stream)
|
|
||||||
else
|
|
||||||
ins(GAME.rep,P1.frameRun)
|
ins(GAME.rep,P1.frameRun)
|
||||||
ins(GAME.rep,0)
|
ins(GAME.rep,0)
|
||||||
end
|
end
|
||||||
|
stream,upstreamProgress=DATA.dumpRecording(GAME.rep,upstreamProgress)
|
||||||
|
if #stream%3==1 then
|
||||||
|
stream=stream.."\0\0"
|
||||||
|
elseif #stream%3==2 then
|
||||||
|
stream=stream.."\0\0\0\0"
|
||||||
|
end
|
||||||
|
NET.uploadRecStream(stream)
|
||||||
lastUpstreamTime=PLAYERS[1].alive and P1.frameRun or 1e99
|
lastUpstreamTime=PLAYERS[1].alive and P1.frameRun or 1e99
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user