]> git.sesse.net Git - mlt/commitdiff
Do not open terminal on stdin if not a tty.
authorDan Dennedy <dan@dennedy.org>
Sun, 5 Jun 2011 22:05:57 +0000 (15:05 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 5 Jun 2011 22:05:57 +0000 (15:05 -0700)
src/melt/melt.c

index 602d36f8065cb2b380202e64c7e0e665b5ee2de8..14b1e7f7c40700a48599abf8f44747008c25d100 100644 (file)
@@ -28,6 +28,7 @@
 #include <sched.h>
 #include <libgen.h>
 #include <limits.h>
+#include <unistd.h>
 
 #include <framework/mlt.h>
 
@@ -625,7 +626,7 @@ int main( int argc, char **argv )
                        if ( pname && pname[0] != '-' )
                                profile = mlt_profile_init( pname );
                }
-               else if ( !strcmp( argv[ i ], "-progress" ) )
+               else if ( !strcmp( argv[ i ], "-progress" ) || !isatty( STDIN_FILENO ) )
                {
                        is_progress = 1;
                }