[FFmpeg-devel] [PATCH] -fs parameter human friendly
Stefano Sabatini
stefano.sabatini-lala
Mon Aug 11 23:43:53 CEST 2008
On date Monday 2008-08-11 21:23:24 +0200, Michael Niedermayer encoded:
> 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
Yep, bright idea.
Regression test passed.
Regards.
--
FFmpeg = Fostering and Frightening Meaningful Proud Ecstatic Goblin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: export-av-strtod-00.patch
Type: text/x-diff
Size: 1569 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080811/6c493434/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-av-strtod-in-cmdutils-00.patch
Type: text/x-diff
Size: 618 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080811/6c493434/attachment-0001.patch>
More information about the ffmpeg-devel
mailing list