From 28d87899e33f2fca524c25fac62b3ffa1488391e Mon Sep 17 00:00:00 2001 From: Marton Balint Date: Thu, 17 Nov 2016 22:10:34 +0100 Subject: [PATCH] ffplay: allow fallback to software renderer Signed-off-by: Marton Balint --- ffplay.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ffplay.c b/ffplay.c index 12502f2764..bb781a2ab5 100644 --- a/ffplay.c +++ b/ffplay.c @@ -1282,6 +1282,10 @@ static int video_open(VideoState *is, Frame *vp) if (window) { SDL_RendererInfo info; renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); + if (!renderer) { + av_log(NULL, AV_LOG_WARNING, "Failed to initialize a hardware accelerated renderer: %s\n", SDL_GetError()); + renderer = SDL_CreateRenderer(window, -1, 0); + } if (renderer) { if (!SDL_GetRendererInfo(renderer, &info)) av_log(NULL, AV_LOG_VERBOSE, "Initialized %s renderer.\n", info.name);