[FFmpeg-devel] [PATCH] -fs parameter human friendly

Michael Niedermayer michaelni
Mon Aug 11 21:23:24 CEST 2008


On Mon, Aug 11, 2008 at 11:00:17AM +0200, Stefano Sabatini wrote:
> Hi all,
> 
> addresses issue 551. It exports the av_strtod() function to eval.h and
> uses it in ffmpeg.c (minor bump missing for easying the maintainance
> of the patch).
[...]
> +static int opt_limit_filesize(const char* opt, const char* arg)
> +{
> +    char *tail;
> +    limit_filesize = av_strtod(arg, &tail);
> +    if(*tail) {
> +        fprintf(stderr, "Invalid value for %s: %s\n", opt, arg);
> +        av_exit(1);
> +    }
> +    return 0;
> +}
> +
>  static const OptionDef options[] = {
>      /* main options */
>      { "L", OPT_EXIT, {(void*)show_license}, "show license" },
> @@ -3761,7 +3773,7 @@
>      { "map", HAS_ARG | OPT_EXPERT, {(void*)opt_map}, "set input stream mapping", "file:stream[:syncfile:syncstream]" },
>      { "map_meta_data", HAS_ARG | OPT_EXPERT, {(void*)opt_map_meta_data}, "set meta data information of outfile from infile", "outfile:infile" },
>      { "t", OPT_FUNC2 | HAS_ARG, {(void*)opt_recording_time}, "record or transcode \"duration\" seconds of audio/video", "duration" },
> -    { "fs", HAS_ARG | OPT_INT64, {(void*)&limit_filesize}, "set the limit file size in bytes", "limit_size" }, //
> +    { "fs", OPT_FUNC2 | HAS_ARG, {(void*)opt_limit_filesize}, "set the limit file size", "limit_size" }, //

this is not a reasonable solution

fix OPT_INT64 instead

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080811/872a6a66/attachment.pgp>



More information about the ffmpeg-devel mailing list