diff options
author | Marton Balint <cus@passwd.hu> | 2016-11-17 22:10:34 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2016-11-20 23:38:06 +0100 |
commit | 28d87899e33f2fca524c25fac62b3ffa1488391e (patch) | |
tree | e118cf1e7335f0f3708e933e01a89eec08a3e14c /ffplay.c | |
parent | 58af48f1c3cc98afc1f25d494f197148801cf210 (diff) | |
download | ffmpeg-28d87899e33f2fca524c25fac62b3ffa1488391e.tar.gz |
ffplay: allow fallback to software renderer
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |