Merge pull request #1557 from ZoneMinder/fix_zmvideo

restore the behaviour where the generated file names are printed to stdout
This commit is contained in:
Andrew Bauer 2016-07-12 15:06:57 -05:00 committed by GitHub
commit 59cc952cef
2 changed files with 3 additions and 5 deletions

View File

@ -414,7 +414,7 @@ sub generateVideo
or Fatal( "Can't execute '$sql': ".$sth->errstr() );
if ( wantarray() )
{
return( $format, sprintf( "%s/%s", getEventPath( $event ), $output ) );
return( $format, $output );
}
}
return( 1 );

View File

@ -222,6 +222,7 @@ foreach my $event_id ( @event_ids ) {
my $video_file = $Event->GenerateVideo( $rate, $fps, $scale, $size, $overwrite, $format );
if ( $video_file ) {
push @video_files, $video_file;
print( STDOUT $video_file."\n" );
}
} # end foreach event_id
@ -253,9 +254,6 @@ if ( $concat_name ) {
Error( "Unable to generate video, check /ffmpeg.log for details");
exit(-1);
}
print( STDOUT $video_file."\n" );
}
#unlink $input_file_list;
#print( STDOUT $event->{MonitorId}.'/'.$event->{Id}.'/'.$video_file."\n" );
#print( STDOUT $video_file."\n" );
exit( 0 );