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();