[FFmpeg-devel] [PATCH] Define ETIMEDOUT in fifo_muxer.c for MinGW/Windows fate build.

Gregory J Wolfe gregory.wolfe at kodakalaris.com
Thu Dec 1 18:37:18 EET 2016


> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On
> Behalf Of James Almer
> Sent: Wednesday, November 30, 2016 5:18 PM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] Define ETIMEDOUT in
> fifo_muxer.c for MinGW/Windows fate build.
> 
> On 11/30/2016 7:02 PM, Gregory J. Wolfe wrote:
> > Fate failed to build in the MinGW/Windows environment because
> > macro ETIMEDOUT was undefined.  When this condition is detected,
> > the code now defines this symbol the same way it's done in
> > libavformat/network.h.
> >
> > Signed-off-by: Gregory J. Wolfe <gregory.wolfe at kodakalaris.com>
> > ---
> >  libavformat/tests/fifo_muxer.c | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/libavformat/tests/fifo_muxer.c
> b/libavformat/tests/fifo_muxer.c
> > index 9659198..97f798f 100644
> > --- a/libavformat/tests/fifo_muxer.c
> > +++ b/libavformat/tests/fifo_muxer.c
> > @@ -25,6 +25,18 @@
> >  #include "libavutil/avassert.h"
> >  #include "libavformat/avformat.h"
> >  #include "libavformat/url.h"
> > +#ifndef ETIMEDOUT
> > +#if HAVE_WINSOCK2_H
> > +#include <winsock2.h>
> > +#include <ws2tcpip.h>
> > +#define ETIMEDOUT       WSAETIMEDOUT
> 
> Why are you duplicating this code instead of simply including
> network.h?

My reasoning is that all that is needed in fifo_muxer.c is that
ETIMEDOUT be defined.  It does not need EVERYTHING that is
in network.h (otherwise it would have already included it).
Given my limited familiarity with FFmpeg source code, I did
not want to introduce unneeded dependencies, but if you
folks don't think that's an issue, fine with me (it is a BIG issue
for our software development team).

So should I submit a revised patch, or, given that the
revised patch would add only a single line of code,
would it be easier for you guys to make the fix directly?

Greg W.

>
> > +#else /* HAVE_WINSOCK2_H */
> > +#include <sys/types.h>
> > +#include <sys/socket.h>
> > +#include <netinet/in.h>
> > +#include <netdb.h>
> > +#endif /* HAVE_WINSOCK2_H */
> > +#endif /* ifndef ETIMEDOUT */
> >
> >  #define MAX_TST_PACKETS 128
> >  #define SLEEPTIME_50_MS 50000
> >
> 



More information about the ffmpeg-devel mailing list