Opened 17 years ago

Last modified 13 years ago

#673 assigned defect

Network timeout

Reported by: nbk@… Owned by: reimar
Priority: normal Component: streaming
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

When playing a stream, MPlayer can hang an undefined amount of time
when there's a network error. This could happen for various reasons:
the stream server crashes without closing the socket, the network
connection hangs up, the user walks outside wifi area, etc.

For example you can reproduce the problem when you open a stream URL
with MPlayer, and after the connection is established and the video
is playing, you run "iptables" to drop the incoming packets from
the server.

The easiest solution to this problem is to add a timeout on the
socket with setsockopt(2). Therefore instead of being stuck in
an I/O operation, MPlayer will get an error and can go on its
execution. (like playing the next item in the playlist)

The fix is really simple so I hope it could be merged in the
repository.

Attachments (1)

network_timeout.patch (1.3 KB ) - added by nbk@… 17 years ago.
Add network timeout

Download all attachments as: .zip

Change History (4)

by nbk@…, 17 years ago

Attachment: network_timeout.patch added

Add network timeout

comment:1 by nbk@…, 17 years ago

comment:2 by r_togni@…, 17 years ago

Status: newassigned

Tcp part applied (without the perror part), udp still pending.

comment:3 by compn, 13 years ago

Owner: changed from r_togni@… to reimar
Note: See TracTickets for help on using tickets.