diff -r daa61fffb811 -r c6c57f6060bd gmyth-stream/server/plugins/transcoders/gmencoder.py --- a/gmyth-stream/server/plugins/transcoders/gmencoder.py Wed Aug 29 14:42:10 2007 +0100 +++ b/gmyth-stream/server/plugins/transcoders/gmencoder.py Thu Oct 25 15:26:21 2007 +0100 @@ -64,7 +64,6 @@ self._insert_param("-o", "file://%s" % path) else: self._insert_param ("-o", "fd://%d" % outfd.fileno()) - self.opts.append ("-c") cmd = " ".join(self.opts) self.log.info(self.tid, "GMencoder: %s" % cmd) @@ -84,8 +83,9 @@ try: if not outfile: p = select.poll() - p.register (outfd, select.POLLNVAL | select.POLLERR | select.POLLHUP | select.POLLIN ) - + p.register (outfd, select.POLLNVAL | select.POLLERR | + select.POLLHUP) + tries = 0 while (self.proc and self.proc.poll() == None): r, w, x = select.select([self.proc.stdout], [], [], 1) if self.proc.stdout in r: @@ -93,12 +93,17 @@ if (progress.find ("PROGRESS") >= 0): self.status = progress.split (":")[1] elif (progress.find ("Erro") >= 0): - return False + self.log.error(self.tid, "Detected problem @ gmencoder:" + " %s" % progress) + if tries < 50: + tries += 1 + else: + return False if not outfile: ret = p.poll(0) if ret: - self.log.info(self.tid, "Lost connection") + self.log.info(self.tid, "* Lost connection *") self.stop () return False