[FFmpeg-devel] [PATCH] lavd/sdl: use maximum available size in window_fullscreen mode
Stefano Sabatini
stefasab at gmail.com
Mon Nov 25 19:54:37 CET 2013
Consistent with ffplay and other tools.
---
libavdevice/sdl.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libavdevice/sdl.c b/libavdevice/sdl.c
index 5dc455c..59a2aa9 100644
--- a/libavdevice/sdl.c
+++ b/libavdevice/sdl.c
@@ -136,6 +136,13 @@ static int event_thread(void *arg)
/* initialization */
SDL_WM_SetCaption(sdl->window_title, sdl->icon_title);
+
+ if (sdl->window_fullscreen) {
+ const SDL_VideoInfo *vi = SDL_GetVideoInfo();
+ sdl->window_width = vi->current_w;
+ sdl->window_height = vi->current_h;
+ }
+ compute_overlay_rect(s);
sdl->surface = SDL_SetVideoMode(sdl->window_width, sdl->window_height,
24, flags);
if (!sdl->surface) {
@@ -264,9 +271,6 @@ static int sdl_write_header(AVFormatContext *s)
goto fail;
}
- /* compute overlay width and height from the codec context information */
- compute_overlay_rect(s);
-
sdl->init_cond = SDL_CreateCond();
if (!sdl->init_cond) {
av_log(s, AV_LOG_ERROR, "Could not create SDL condition variable: %s\n", SDL_GetError());
--
1.8.1.2
More information about the ffmpeg-devel
mailing list