[MPlayer-dev-eng] [SURVEY] change mencoder's default ofilename extension?

The Wanderer inverseparadox at comcast.net
Tue Dec 13 04:13:42 CET 2005


Reynaldo H. Verdejo Pinochet wrote:

> On Fri, Nov 25, 2005 at 08:43:02PM -0300, Reynaldo H. Verdejo
> Pinochet wrote:
> 
>> Default output filename of mencoder is always test.avi regardles of
>> the muxer been used. Without trying to step on a 'extension
>> are/arent meaningles' flame, think about windows user/progs that
>> rely on filename extension to make 'open-with' asociations, icons
>> disposal, etc. it may even be some apps that rely only on the
>> extension for filetype identification.
> 
> Ok, hope everyone interested had time to react.
> 
> Option 5, propossed by Oded seems to be the winner* followed close by
> '1' (force -o) attached is a slightly modified version of the patch.
> Will commit tomorrow morning.

...the argument never actually *finished*, from my perspective; the last
post in the thread was part of the argument between myself and Oded
about "correct" behaviour (in which I asked some questions, and never
got a response...).

I still don't agree that this patch fixes the original problem, although
it does (if properly implemented, which at a glance it seems to be)
provide a less-than-ideal fix for another problem.


> +	if (out_file_format == MUXER_TYPE_AVI) {
> +		if (strcmp(out_filename + n, "avi") &&
> +			strcmp(out_filename + n, "AVI"))
> +			mp_msg(MSGT_MENCODER, MSGL_WARN, MSGTR_MencoderWrongFormatAVI);
> +	}
> +	if (out_file_format == MUXER_TYPE_MPEG) {
> +		if (strcmp(out_filename + n, "mpg") &&
> +			strcmp(out_filename + n, "mpeg") &&
> +			strcmp(out_filename + n, "vob") &&
> +			strcmp(out_filename + n, "MPG") &&
> +			strcmp(out_filename + n, "MPEG") &&
> +			strcmp(out_filename + n, "VOB"))
> +			mp_msg(MSGT_MENCODER, MSGL_WARN, MSGTR_MencoderWrongFormatMPG);

Why not strcasecmp, since (as Reimar said) we use that all over the
place anyway? It would cut a few lines and still provide more robust
functionality than the current patch.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.




More information about the MPlayer-dev-eng mailing list