[MPlayer-cvslog] CVS: main mencoder.c,1.326,1.327
Joey Parrish
joey at nicewarrior.org
Fri Dec 23 14:53:47 CET 2005
The Wanderer CVS wrote:
>CVS change done by The Wanderer CVS
>
>Update of /cvsroot/mplayer/main
>In directory mail:/var2/tmp/cvs-serv2139
>
>Modified Files:
> mencoder.c
>Log Message:
>make -o mandatory and add a warning when the extension does not match
the container format, patch by Reynaldo Pinochet
>
>Index: mencoder.c
>===================================================================
>RCS file: /cvsroot/mplayer/main/mencoder.c,v
>retrieving revision 1.326
>retrieving revision 1.327
>diff -u -r1.326 -r1.327
>--- mencoder.c 7 Dec 2005 10:07:27 -0000 1.326
>+++ mencoder.c 15 Dec 2005 17:57:18 -0000 1.327
>@@ -170,7 +170,7 @@
> unsigned int vobsub_out_index=0;
> char *vobsub_out_id=NULL;
>
>-char* out_filename="test.avi";
>+char* out_filename=NULL;
>
> char *force_fourcc=NULL;
> int force_audiofmttag=-1;
>@@ -465,6 +465,33 @@
> filelist = m_config_parse_me_command_line(mconfig, argc, argv);
> if(!filelist) mencoder_exit(1, MSGTR_ErrorParsingCommandLine);
>
>+{
>+ char *extension;
>+
>+ if (!out_filename) mencoder_exit(1,MSGTR_MissingOutputFilename);
>+ extension=strrchr(out_filename,'.');
>+ if (extension != NULL && strlen(extension) > 3 &&
strlen(extension) < 6)
>+ {
>+ extension++;
>+
>+ switch (out_file_format)
>+ {
>+ case MUXER_TYPE_AVI:
>+ if (strcasecmp(extension,"avi"))
>+ mp_msg(MSGT_MENCODER, MSGL_WARN,
MSGTR_MencoderWrongFormatAVI);
>+ break;
>+
>+ case MUXER_TYPE_MPEG:
>+ if (strcasecmp(extension,"mpg") &&
>+ strcasecmp(extension,"mpeg") &&
>+ strcasecmp(extension,"vob"))
>+ mp_msg(MSGT_MENCODER, MSGL_WARN,
MSGTR_MencoderWrongFormatMPG);
>+ break;
>+ }
>+ }
>+}
>+
>+
> if (frameno_filename) {
> stream2=open_stream(frameno_filename,0,&i);
> if(stream2){
Now, the next thing I'd like to see done is to set default output format
to MUXER_TYPE_AUTO and use filename extension here to set muxer type.
Any objections?
--Joey
More information about the MPlayer-cvslog
mailing list