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
This commit is contained in:
ods15 2005-10-13 19:30:07 +00:00
parent fc96ad08af
commit c3ea61ff6c
2 changed files with 8 additions and 1 deletions

View File

@ -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"

View File

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