diff -r 57833200a415 -r 2eef40885322 gmyth-stream/plugins/media/ffmpeg.py --- a/gmyth-stream/plugins/media/ffmpeg.py Fri Mar 30 04:12:52 2007 +0100 +++ b/gmyth-stream/plugins/media/ffmpeg.py Fri Mar 30 23:07:54 2007 +0100 @@ -38,13 +38,13 @@ del(self.socket) self.socket = socket.socket(socket.AF_INET,socket.SOCK_STREAM) + self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.socket.bind( ('', self.port) ) self.socket.settimeout(10) + self.socket.listen(1) def play(self): - self.socket.listen(1) - lib.log("Starting FFmpeg: %s" % self.path) # exec FFmpeg and get stdout @@ -82,8 +82,9 @@ def stop(self): - lib.log("Closing socket") - self.socket.close() + if (self.socket != None): + lib.log("Closing socket") + self.socket.close() lib.log("Trying to stop FFmpeg process") if (self.child_pid != None):