[FFmpeg-devel] [PATCH 2/5] ffplay: fix compilation with Visual Studio
Marton Balint
cus at passwd.hu
Sat May 10 16:04:06 CEST 2014
A patch by achristensen from trac.ffmpeg.org.
Fixes ticket #3580.
Signed-off-by: Marton Balint <cus at passwd.hu>
---
ffplay.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 588aff58..1fe7107 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2824,7 +2824,10 @@ static int read_thread(void *arg)
if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) {
AVStream *st = ic->streams[st_index[AVMEDIA_TYPE_VIDEO]];
AVCodecContext *avctx = st->codec;
- VideoPicture vp = {.width = avctx->width, .height = avctx->height, .sar = av_guess_sample_aspect_ratio(ic, st, NULL)};
+ VideoPicture vp;
+ vp.width = avctx->width;
+ vp.height = avctx->height;
+ vp.sar = av_guess_sample_aspect_ratio(ic, st, NULL);
if (vp.width)
set_default_window_size(&vp);
}
@@ -3632,7 +3635,7 @@ int main(int argc, char **argv)
flags &= ~SDL_INIT_AUDIO;
if (display_disable)
SDL_putenv(dummy_videodriver); /* For the event queue, we always need a video driver. */
-#if !defined(__MINGW32__) && !defined(__APPLE__)
+#if !defined(__MINGW32__) && !defined(__APPLE__) && !defined(_MSC_VER)
flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */
#endif
if (SDL_Init (flags)) {
--
1.8.4.5
More information about the ffmpeg-devel
mailing list