[FFmpeg-devel] ffplay -fs fix (ticket #3964)

Marton Balint cus at passwd.hu
Mon Sep 22 22:19:16 CEST 2014


On Fri, 19 Sep 2014, Jeff Dwork wrote:

> On MS Windows, 'ffplay.exe -fs' does not start fullscreen. Behavior on linux 
> is correct.
>
> On Windows, the initial placement of the SDL screen triggers the 
> SDL_VIDEORESIZE event. This executes the code in the event_loop which calls 
> SDL_SetVideoMode with the SDL_RESIZEABLE bit set. On linux the resize event 
> does not occur.
>
> I can see an obvious flicker on my laptop as the initial fullscreen window is 
> replaced by the normal window. I don't see it on my faster desktop system.
>
> The fix is simple - don't execute SDL_SetVideoMode in the event_loop if 
> is_full_screen is set.
> Diff for ffplay version N-66289-gb76d613
>
> diff original/ffplay.c fixed/ffplay.c
> 3469,3470c3469,3471
> <                 screen = SDL_SetVideoMode(FFMIN(16383, event.resize.w), 
> event.resize.h, 0,
> < SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL);
> ---
>>                 if (!is_full_screen)
>>                     screen = SDL_SetVideoMode(FFMIN(16383, event.resize.w), 
> event.resize.h, 0,
>> SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL);
>

I'd rather fix this a bit differently, could you please try the attached 
patch?

Thanks,
Marton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffplay-handle-fullscreen-status-on-resize-event.patch
Type: text/x-patch
Size: 1007 bytes
Desc: 
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140922/16360db4/attachment.bin>


More information about the ffmpeg-devel mailing list