[fpc-pascal] Cannot run mplayer with TProcess when options is poUsePipes in Windows

Dusan Halicky dusan.halicky at gmail.com
Mon Nov 10 09:57:42 CET 2008


Following code works in linux, but not in windows. In windows program
freeze, or I don't see mplayer. Thanks.

program bug;

{$mode objfpc}{$H+}

uses
  Classes, SysUtils, Process;

begin
  with TProcess.Create(nil) do
  try
    //Options := [];            // this work on both Windows and Linux
    Options := [poUsePipes];  // this doesn't work in Windows but works in Linux
    CommandLine := 'mplayer -slave -quiet final.avi';
    Execute;
    writeln('press enter to exit');
    readln;
  finally
    Free;
  end;
end.



More information about the fpc-pascal mailing list