diff mencoder.c @ 16752:425863aab3df

fix mencoder multi-file with some files having audio but others dont
author ods15
date Thu, 13 Oct 2005 19:30:07 +0000
parents 89504641c2a5
children 5f23a3beddfd
line wrap: on
line diff
--- a/mencoder.c	Thu Oct 13 19:15:30 2005 +0000
+++ b/mencoder.c	Thu Oct 13 19:30:07 2005 +0000
@@ -948,7 +948,12 @@
 
 timer_start=GetTimerMS();
 } // if (!curfile) // if this was the first file.
-else if (sh_audio) {
+else {
+if (!mux_a != !sh_audio) {
+	mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_NoAudioFileMismatch);
+	mencoder_exit(1,NULL);
+}
+if (sh_audio) {
 	int out_format = 0, out_minsize = 0, out_maxsize = 0;
 	int do_init_filters = 1;
 	if((aencoder != NULL) && (mux_a->codec != ACODEC_COPY))
@@ -1011,6 +1016,7 @@
 	  mux_a->wf->nChannels = out_channels;
 	}
 }
+}
 
 parse_end_at();