[FFmpeg-devel] [PATCH] ffplay: use dummy video driver if display is disabled
Marton Balint
cus at passwd.hu
Tue Jun 5 22:54:30 CEST 2012
Fixes ticket 1402.
Signed-off-by: Marton Balint <cus at 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/ffplay.c
+++ b/ffplay.c
@@ -3220,6 +3220,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);
@@ -3257,6 +3258,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
--
1.7.3.4
More information about the ffmpeg-devel
mailing list