]> git.sesse.net Git - ffmpeg/commit
avformat/tls_schannel: immediately return decrypted data if available
authorJan Ekström <jeebjp@gmail.com>
Tue, 12 May 2020 21:31:03 +0000 (00:31 +0300)
committerJan Ekström <jeebjp@gmail.com>
Wed, 13 May 2020 14:05:23 +0000 (17:05 +0300)
commit6f8826e4aaddf1ee6cf3f333ed0e392a748382fe
tree84a91006681de80ae82342693cc6654292ff0cd0
parent39977fff20048f1798a95c593d6034a0e73ebbe5
avformat/tls_schannel: immediately return decrypted data if available

Until now, we would have only attempted to utilize already decrypted
data if it was enough to fill the size of buffer requested, that could
very well be up to 32 kilobytes.

With keep-alive connections this would just lead to recv blocking
until rw_timeout had been reached, as the connection would not be
officially closed after each transfer. This would also lead to a
loop, as such timed out I/O request would just be attempted again.

By just returning the available decrypted data, keep-alive based
connectivity such as HLS playback is fixed with schannel.
libavformat/tls_schannel.c