[vlc-devel] Getting stuck in hls_Download (stream_Read function) to some HLS server
52401692 at qq.com
Wed Mar 19 11:12:15 CET 2014
This issue is happened to some HLS server (m3u8 url), after playing the live streaming for some time, the screen stop responding.
Through debugging on the VLC source code and logging in IIS server, I discover the problem was in the function hls_download() which is in the source file “httplive.c“
There is probability that stream_read() jump into infinite loop. This is due to poll (select) time limit is -1 (infinite loop or until data received completed or network disconnected) For the packet sniffer and IIS logging, IIS logging show :
GET /live107.ts - 9010 - 220.127.116.11（IP） VLC/2.1.2+LibVLC/2.1.2 206 0 64
The last word 64 is error code for “the specified network name is no longer available”
These mean clients already close the communication port or no responding “ack”.
Details of this issue can be found here: http://stackoverflow.com/questions/372149/iis-file-download-hangs-timeouts-sc-win32-status-64
Sniffer packet showed that server did not completely send the data, may be due to network or firewall issue, due to this issue, the TS file receiving function will keep waiting there, this cause the process blocking.
Regarding this issue, someone has asked this question before:
Therefore, I believe the best way is to let the hls_Download() can support time limit, I see this vlc_object_waitpipe() should be able to handle this, after the time limit, exit the infinite loop. But I did not know how to achieve this, please guide me if possible.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel