# HG changeset patch # User pl # Date 1005695013 0 # Node ID bc648c6a464af3343496ce0f3f30a554b9711251 # Parent b5fde2e72aef3e57618c7df56b6a5d2a7f6260c9 fixes a segfault if file specified in -o can't be accessed (bug found by Colin Marquardt ) diff -r b5fde2e72aef -r bc648c6a464a mencoder.c --- a/mencoder.c Tue Nov 13 23:17:31 2001 +0000 +++ b/mencoder.c Tue Nov 13 23:43:33 2001 +0000 @@ -412,6 +412,11 @@ // set up output file: muxer_f=fopen(out_filename,"wb"); +if(!muxer_f) { + printf("Cannot open output file '%s'\n", out_filename); + exit(1); +} + muxer=aviwrite_new_muxer(); // ============= VIDEO ===============