aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-13 19:30:07 +0000
committerGravatar ods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-13 19:30:07 +0000
commitc3ea61ff6c441f41637ac57b7e07205b630a940a (patch)
tree56a736e87e608ef37b7867a32c5dee74c696a144
parentfc96ad08afc413574a37f52efa9522741c379cf8 (diff)
fix mencoder multi-file with some files having audio but others dont
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16753 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--help/help_mp-en.h1
-rw-r--r--mencoder.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/help/help_mp-en.h b/help/help_mp-en.h
index c17c035e90..8c61ff69e3 100644
--- a/help/help_mp-en.h
+++ b/help/help_mp-en.h
@@ -218,6 +218,7 @@ static char help_text[]=
#define MSGTR_ResolutionDoesntMatch "\nNew video file has different resolution or colorspace than the previous one.\n"
#define MSGTR_FrameCopyFileMismatch "\nAll video files must have identical fps, resolution, and codec for -ovc copy.\n"
#define MSGTR_AudioCopyFileMismatch "\nAll files must have identical audio codec and format for -oac copy.\n"
+#define MSGTR_NoAudioFileMismatch "\nCan not mix video-only files with audio and video files. Try -nosound.\n"
#define MSGTR_NoSpeedWithFrameCopy "WARNING: -speed is not guaranteed to work correctly with -oac copy!\n"\
"Your encode might be broken!\n"
#define MSGTR_ErrorWritingFile "%s: Error writing file.\n"
diff --git a/mencoder.c b/mencoder.c
index 16deef9af0..3ab52a56a8 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -948,7 +948,12 @@ signal(SIGPIPE,exit_sighandler); // broken pipe
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 @@ else if (sh_audio) {
mux_a->wf->nChannels = out_channels;
}
}
+}
parse_end_at();