avformat/http: flushing tcp receive buffer when it is write only mode
authorVishwanath Dixit <vdixit@akamai.com>
Wed, 4 Apr 2018 11:08:18 +0000 (16:38 +0530)
committerKarthick Jeyapal <kjeyapal@akamai.com>
Fri, 20 Apr 2018 06:01:21 +0000 (11:31 +0530)
commit30940be3593aee6144a9d238f25eef1aa4575c41
treebf1e4c088fca29ad6257a13f1faf8d7aa6d8ca85
parent002e45b40760b15319a3f2ea3d2c78bd9cc72d38
avformat/http: flushing tcp receive buffer when it is write only mode

In write only mode, the TCP receive buffer's data keeps growing with
http response messages and the buffer eventually becomes full.
This results in zero tcp window size, which in turn causes unwanted
issues, like, terminated tcp connection. The issue is apparent when
http persistent connection is enabled in hls/dash live streaming use
cases. To overcome this issue, the logic here reads the buffer data
when a file transfer is completed, so that any accumulated data in
the recieve buffer gets flushed out.
libavformat/http.c