Only output output if there is any

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1911 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2006-03-31 15:34:39 +00:00
parent 131ed30d7a
commit 7dafbb5731
1 changed files with 8 additions and 4 deletions

View File

@ -275,9 +275,11 @@ if ( $overwrite || !-s $video_file )
my $command = ZM_PATH_MPEG_ENCODE." $param_file >mpeg_encode.log";
Info( $command."\n" );
my $output = qx($command);
if ( my $output = qx($command) )
{
Info( $output."\n" );
}
}
elsif ( ZM_OPT_MPEG eq "ffmpeg" )
{
my $frame_rate = sprintf( "%.2f", $event->{Frames}/$event->{FullLength} );
@ -314,9 +316,11 @@ if ( $overwrite || !-s $video_file )
my $command = ZM_PATH_FFMPEG." -y -r $frame_rate ".ZM_FFMPEG_INPUT_OPTIONS." -i %0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg -s $video_size ".ZM_FFMPEG_OUTPUT_OPTIONS." '$video_file' > ffmpeg.log";
Info( $command."\n" );
my $output = qx($command);
if ( my $output = qx($command) )
{
Info( $output."\n" );
}
}
else
{
die( "Bogus mpeg option ".ZM_OPT_MPEG."\n" );