aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2012-06-03 19:36:06 +0200
committerMarton Balint <cus@passwd.hu>2012-06-07 00:05:29 +0200
commit1372c826de242fccec8e3d42282ac458a84bb43e (patch)
tree99137da65f92bfd169f7ccba8616d890b491d960
parent8d1de449f0062682f8562fc0a96b13dfaa3723e7 (diff)
downloadffmpeg-1372c826de242fccec8e3d42282ac458a84bb43e.tar.gz
ffplay: use dummy video driver if display is disabled
Fixes ticket 1402. Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--ffplay.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index 86444a822b..7b9c42ea83 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -3060,6 +3060,7 @@ int main(int argc, char **argv)
{
int flags;
VideoState *is;
+ char dummy_videodriver[] = "SDL_VIDEODRIVER=dummy";
av_log_set_flags(AV_LOG_SKIP_REPEATED);
parse_loglevel(argc, argv, options);
@@ -3097,6 +3098,8 @@ int main(int argc, char **argv)
flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
if (audio_disable)
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__)
flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */
#endif