mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-13 19:01:03 +00:00
ffplay: allow fallback to software renderer
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
58af48f1c3
commit
28d87899e3
4
ffplay.c
4
ffplay.c
@ -1282,6 +1282,10 @@ static int video_open(VideoState *is, Frame *vp)
|
|||||||
if (window) {
|
if (window) {
|
||||||
SDL_RendererInfo info;
|
SDL_RendererInfo info;
|
||||||
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
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 (renderer) {
|
||||||
if (!SDL_GetRendererInfo(renderer, &info))
|
if (!SDL_GetRendererInfo(renderer, &info))
|
||||||
av_log(NULL, AV_LOG_VERBOSE, "Initialized %s renderer.\n", info.name);
|
av_log(NULL, AV_LOG_VERBOSE, "Initialized %s renderer.\n", info.name);
|
||||||
|
Loading…
Reference in New Issue
Block a user