Skip to content
Snippets Groups Projects
Commit 28d87899 authored by Marton Balint's avatar Marton Balint
Browse files

ffplay: allow fallback to software renderer


Signed-off-by: default avatarMarton Balint <cus@passwd.hu>
parent 58af48f1
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment