---
Not sure if this is the best approach, but this simple checks avoids derp 
avconv calls like

    avconv -y my_very_important_input_file.avi output.avi

which would overwrite your input file...
Vittorio

 avconv_opt.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/avconv_opt.c b/avconv_opt.c
index afb967e..c1fbf16 100644
--- a/avconv_opt.c
+++ b/avconv_opt.c
@@ -513,6 +513,10 @@ static void assert_file_overwrite(const char *filename)
         fprintf(stderr, "Error, both -y and -n supplied. Exiting.\n");
         exit_program(1);
     }
+    if (!nb_input_files) {
+        fprintf(stderr, "Error, no input files provided. Exiting.\n");
+        exit_program(1);
+    }
 
     if (!file_overwrite &&
         (strchr(filename, ':') == NULL || filename[1] == ':' ||
-- 
1.7.9.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to