diff options
author | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-07 19:23:04 +0000 |
---|---|---|
committer | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-07 19:23:04 +0000 |
commit | 54de722443c3b8b21fcd9b783788f762b1c3aca9 (patch) | |
tree | a784b01409251359df8f4a6af2be6e3ee9f0babb /libmpdemux | |
parent | d56ebb97688f43861662ddd87cc3e87198b47bb5 (diff) |
Fix hang on broken mmst streams
Patch by adland
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12546 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/asf_mmst_streaming.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/asf_mmst_streaming.c b/libmpdemux/asf_mmst_streaming.c index 12ec6b0a4c..da3e766587 100644 --- a/libmpdemux/asf_mmst_streaming.c +++ b/libmpdemux/asf_mmst_streaming.c @@ -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); |