[MPlayer-cvslog] r27650 - in trunk: DOCS/man/en/mplayer.1 DOCS/man/fr/mplayer.1 libvo/vo_png.c

Uoti Urpala uoti.urpala at pp1.inet.fi
Sat Sep 20 15:26:54 CEST 2008


> Log:
> add outdir sub-option to vo png

> +#define BUFLENGTH 512

> +static void png_mkdir(char *buf, int verbose) {

IMO it would  be preferable to require the directory to exist rather
than add all this filesystem code to an individual VO. You could as well
allow it to be an arbitrary filename prefix instead of a directory, so
with the prefix '/tmp/test' you'd get "/tmp/test00000005.png" etc.

> -    snprintf (buf, 100, "%08d.png", ++framenum);
> +    snprintf (buf, 100, "%s/%08d.png", png_outdir, ++framenum);

Above you define a longer BUFLENGTH, but this still uses the same 100
byte limit which can be low enough to cause problems in practice.
Avoiding a static limit here completely shouldn't be too hard.





More information about the MPlayer-cvslog mailing list