From f1db6a34f81bad0cdf4a28ec22cfee89bff62ce1 Mon Sep 17 00:00:00 2001
From: Marton Balint <cus@passwd.hu>
Date: Sun, 3 Jun 2012 19:36:06 +0200
Subject: [PATCH] ffplay: use dummy video driver if display is disabled
Fixes ticket 1402.
Signed-off-by: Marton Balint <cus@passwd.hu>
---
ffplay.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 3134c3a..f3d015f 100644
|
a
|
b
|
int main(int argc, char **argv) |
| 3220 | 3220 | { |
| 3221 | 3221 | int flags; |
| 3222 | 3222 | VideoState *is; |
| | 3223 | char dummy_videodriver[] = "SDL_VIDEODRIVER=dummy"; |
| 3223 | 3224 | |
| 3224 | 3225 | av_log_set_flags(AV_LOG_SKIP_REPEATED); |
| 3225 | 3226 | parse_loglevel(argc, argv, options); |
| … |
… |
int main(int argc, char **argv) |
| 3257 | 3258 | flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER; |
| 3258 | 3259 | if (audio_disable) |
| 3259 | 3260 | flags &= ~SDL_INIT_AUDIO; |
| | 3261 | if (display_disable) |
| | 3262 | SDL_putenv(dummy_videodriver); /* For the event queue, we always need a video driver. */ |
| 3260 | 3263 | #if !defined(__MINGW32__) && !defined(__APPLE__) |
| 3261 | 3264 | flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */ |
| 3262 | 3265 | #endif |