mirror of
https://github.com/mpv-player/mpv
synced 2025-02-28 19:30:44 +00:00
Fix hang on broken mmst streams
Patch by adland git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12546 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d56ebb9768
commit
54de722443
@ -171,7 +171,7 @@ static int get_data (int s, char *buf, size_t count)
|
||||
|
||||
len = recv (s, &buf[total], count-total, 0);
|
||||
|
||||
if (len<0) {
|
||||
if (len<=0) {
|
||||
perror ("read error:");
|
||||
return 0;
|
||||
}
|
||||
@ -538,6 +538,7 @@ int asf_mmst_streaming_start(stream_t *stream)
|
||||
|
||||
asf_header_len = get_header (s, asf_header, stream->streaming_ctrl);
|
||||
// printf("---------------------------------- asf_header %d\n",asf_header);
|
||||
if (asf_header_len==0) return -1; //error reading header
|
||||
packet_length = interp_header (asf_header, asf_header_len);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user