gmyth-stream/server/plugins/media/mencoder.py
branchtrunk
changeset 513 12a61040588d
parent 504 2b5355061b66
child 514 b5352888e3c2
     1.1 --- a/gmyth-stream/server/plugins/media/mencoder.py	Wed Apr 04 23:30:44 2007 +0100
     1.2 +++ b/gmyth-stream/server/plugins/media/mencoder.py	Mon Apr 09 15:20:37 2007 +0100
     1.3 @@ -35,7 +35,7 @@
     1.4          for opt in options:
     1.5  
     1.6              if opt == "local":
     1.7 -                self.mplayer = os.popen("which mplayer").read().strip()
     1.8 +                self.mplayer = lib.which("mplayer")
     1.9  
    1.10              elif opt.find("language=") >= 0:
    1.11                  try:
    1.12 @@ -57,7 +57,7 @@
    1.13              msg = "dvd://" + msg
    1.14  
    1.15          self.mplayer += " " + msg
    1.16 -        self.mplayer_pid = Popen(self.mplayer, shell=True)
    1.17 +        self.mplayer_pid = Popen(self.mplayer, shell=True, close_fds=True)
    1.18  
    1.19      def setup_mencoder(self):
    1.20          self.path = self.config.get("Mencoder", "path")
    1.21 @@ -169,7 +169,8 @@
    1.22          lib.log("Starting Mencoder: %s %s" % (self.path, self.args) )
    1.23          # exec Mencoder
    1.24          if self.mencoder_old:
    1.25 -            self.mencoder_pid = Popen(self.path + self.args, shell=True)
    1.26 +            self.mencoder_pid = Popen(self.path + self.args, shell=True,
    1.27 +                                      close_fds=True)
    1.28              self.pout = open(self.fifo)
    1.29          else:
    1.30              self.path += self.args