mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +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) {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user