[FFmpeg-devel] [PATCH] Make parse_options use parse_number_or_die for parsing args
Michael Niedermayer
michaelni
Mon Feb 25 03:48:41 CET 2008
On Mon, Feb 25, 2008 at 12:39:09AM +0100, Stefano Sabatini wrote:
> Hi, as in $subject.
>
> BTW, I still somehow don't like the parse_number_or_die function since it can't
> for example checks for errors like these:
> ffmpeg -dframes 123.456
>
> 123.456 is converted to 123, no warning issued.
Thats because your code is buggy.
[...]
> - *po->u.int_arg = atoi(arg);
> + *po->u.int_arg = parse_number_or_die(opt+1, arg, OPT_INT, INT_MIN, INT_MAX);
use OPT_INT64 here
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- 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/20080225/d40d4da7/attachment.pgp>
More information about the ffmpeg-devel
mailing list