Browse Source

mingw patch by (Bill Eldridge <bill at rfa dot org>)

Originally committed as revision 1347 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Bill Eldridge Michael Niedermayer 22 years ago
parent
commit
9b2e001fc5
2 changed files with 7 additions and 0 deletions
  1. +5
    -0
      libavformat/img.c
  2. +2
    -0
      libavformat/utils.c

+ 5
- 0
libavformat/img.c View File

@@ -38,6 +38,11 @@ extern AVInputFormat ppmpipe_iformat;
extern AVOutputFormat ppmpipe_oformat; extern AVOutputFormat ppmpipe_oformat;
extern AVOutputFormat yuv4mpegpipe_oformat; extern AVOutputFormat yuv4mpegpipe_oformat;


#ifdef __MINGW32__
# include <windows.h>
# define usleep(t) Sleep((t) / 1000)
#endif

#define IMGFMT_YUV 1 #define IMGFMT_YUV 1
#define IMGFMT_PGMYUV 2 #define IMGFMT_PGMYUV 2
#define IMGFMT_PGM 3 #define IMGFMT_PGM 3


+ 2
- 0
libavformat/utils.c View File

@@ -354,12 +354,14 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
} }
/* XXX: suppress this hack for redirectors */ /* XXX: suppress this hack for redirectors */
#ifndef __MINGW32__
if (fmt == &redir_demux) { if (fmt == &redir_demux) {
err = redir_open(ic_ptr, &ic->pb); err = redir_open(ic_ptr, &ic->pb);
url_fclose(&ic->pb); url_fclose(&ic->pb);
av_free(ic); av_free(ic);
return err; return err;
} }
#endif


ic->iformat = fmt; ic->iformat = fmt;




Loading…
Cancel
Save