[vlc-devel] Getting stuck in hls_Download (stream_Read function) tosome HLS server
52401692 at qq.com
Wed Mar 19 13:32:32 CET 2014
And I found, from the netstat command, the client machine can find one connection:
192.168.1.2:32828 serverIP:port ESTABLISHED 12212 (12212 is vlc process).
but the server can not find this connection.
And this connection recv/select always correct ( recv returns -1 and select is 0).
so this blocks to get next ts file, and the picture is stucked.
------------------ Original ------------------
From: "peng";<52401692 at qq.com>;
Date: Wed, Mar 19, 2014 06:12 PM
To: "Mailing list for VLC media player developers"<vlc-devel at videolan.org>;
Subject: [vlc-devel] Getting stuck in hls_Download (stream_Read function) tosome HLS server
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 - 126.96.36.199（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