[FFmpeg-devel] [PATCH] Work around msvc (c99wrap) build failure
Michael Niedermayer
michaelni at gmx.at
Mon Aug 26 05:13:01 CEST 2013
On Sun, Aug 25, 2013 at 06:30:35PM -0600, pkoshevoy at gmail.com wrote:
> From: Pavel Koshevoy <pkoshevoy at gmail.com>
>
> c99wrap choked on initialization of .dbl start_time option with
> AV_NOPTS_VALUE: Unable to parse int64_t as expression primary
>
> Signed-off-by: Pavel Koshevoy <pkoshevoy at gmail.com>
> ---
> libavfilter/vf_fps.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
> index e30e90b..219bcd1 100644
> --- a/libavfilter/vf_fps.c
> +++ b/libavfilter/vf_fps.c
> @@ -25,6 +25,8 @@
> * a filter enforcing given constant framerate
> */
>
> +#include <float.h>
> +
> #include "libavutil/common.h"
> #include "libavutil/fifo.h"
> #include "libavutil/mathematics.h"
> @@ -61,7 +63,7 @@ typedef struct FPSContext {
> #define F AV_OPT_FLAG_FILTERING_PARAM
> static const AVOption fps_options[] = {
> { "fps", "A string describing desired output framerate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, { .str = "25" }, .flags = V|F },
> - { "start_time", "Assume the first PTS should be this value.", OFFSET(start_time), AV_OPT_TYPE_DOUBLE, { .dbl = AV_NOPTS_VALUE}, INT64_MIN, INT64_MAX, V },
> + { "start_time", "Assume the first PTS should be this value.", OFFSET(start_time), AV_OPT_TYPE_DOUBLE, { .dbl = DBL_MAX }, -DBL_MAX, DBL_MAX, V },
does INT64_MIN work as well ?
if so i think its preferable as it has the same nummeric value as
AV_NOPTS_VALUE, introducing no change except the fix/workaround
(vf_fps.c could check by assert that the 2 match)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130826/6c65ea1d/attachment.asc>
More information about the ffmpeg-devel
mailing list