aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2016-11-17 22:10:34 +0100
committerMarton Balint <cus@passwd.hu>2016-11-20 23:38:06 +0100
commit28d87899e33f2fca524c25fac62b3ffa1488391e (patch)
treee118cf1e7335f0f3708e933e01a89eec08a3e14c
parent58af48f1c3cc98afc1f25d494f197148801cf210 (diff)
downloadffmpeg-28d87899e33f2fca524c25fac62b3ffa1488391e.tar.gz
ffplay: allow fallback to software renderer
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--ffplay.c4
1 files changed, 4 insertions, 0 deletions
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);