Ticket #1402: 0001-ffplay-use-dummy-video-driver-if-display-is-disabled.patch

File 0001-ffplay-use-dummy-video-driver-if-display-is-disabled.patch, 1.1 KB (added by cus, 5 years ago)
  • ffplay.c

    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) 
    32203220{ 
    32213221    int flags; 
    32223222    VideoState *is; 
     3223    char dummy_videodriver[] = "SDL_VIDEODRIVER=dummy"; 
    32233224 
    32243225    av_log_set_flags(AV_LOG_SKIP_REPEATED); 
    32253226    parse_loglevel(argc, argv, options); 
    int main(int argc, char **argv) 
    32573258    flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER; 
    32583259    if (audio_disable) 
    32593260        flags &= ~SDL_INIT_AUDIO; 
     3261    if (display_disable) 
     3262        SDL_putenv(dummy_videodriver); /* For the event queue, we always need a video driver. */ 
    32603263#if !defined(__MINGW32__) && !defined(__APPLE__) 
    32613264    flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */ 
    32623265#endif