[FFmpeg-devel] [PATCH] Make parse_date return INT64_MIN in case of unparsable input
Stefano Sabatini
stefano.sabatini-lala
Tue Sep 18 17:50:37 CEST 2007
On date Tuesday 2007-09-18 16:07:35 +0200, Benoit Fouet encoded:
> Hi,
>
> Stefano Sabatini wrote:
> > Index: ffmpeg.c
> > ===================================================================
> > --- ffmpeg.c (revision 10526)
> > +++ ffmpeg.c (working copy)
> > @@ -2494,21 +2494,39 @@
> > static void opt_recording_time(const char *arg)
> > {
> > recording_time = parse_date(arg, 1);
> > + if (recording_time == INT64_MIN) {
> > + fprintf(stderr, "Unparsable duration specification: %s\n", arg);
> >
>
> s/Unparsable/Invalid/ ?
As you prefer.
> > + exit(1);
> > + }
> > }
> >
> > static void opt_start_time(const char *arg)
> > {
> > start_time = parse_date(arg, 1);
> > + if (start_time == INT64_MIN) {
> > + fprintf(stderr, "Unparsable duration specification: %s\n", arg);
> >
>
> ditto
>
> > + exit(1);
> > + }
> > }
> >
> > static void opt_rec_timestamp(const char *arg)
> > {
> > - rec_timestamp = parse_date(arg, 0) / 1000000;
> > + int64_t rec_timestamp_us;
> > + rec_timestamp_us = parse_date(arg, 0);
> >
>
> you can merge declaration and affectation
OK.
[...]
New patch attached.
Regards.
--
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-parse-date-return-int64min-if-unparsable-input-03.patch
Type: text/x-diff
Size: 5558 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070918/5ed515c3/attachment.patch>
More information about the ffmpeg-devel
mailing list