forked from FFmpeg/FFmpeg
ffplay: avoid SIGFPE exception in SDL_DisplayYUVOverlay
In video_image_display(), fix exception occurring when the size of the rectangle passed to SDL_DisplayYUVOverlay() is 0x0, which happens when interactively resizing the SDL window. This is done by forcing the minimum size to 1x1. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
This commit is contained in:
parent
fbfcc8f1b7
commit
69f58958ce
1 changed files with 2 additions and 2 deletions
4
ffplay.c
4
ffplay.c
|
@ -752,8 +752,8 @@ static void video_image_display(VideoState *is)
|
|||
}
|
||||
rect.x = is->xleft + x;
|
||||
rect.y = is->ytop + y;
|
||||
rect.w = width;
|
||||
rect.h = height;
|
||||
rect.w = FFMAX(width, 1);
|
||||
rect.h = FFMAX(height, 1);
|
||||
SDL_DisplayYUVOverlay(vp->bmp, &rect);
|
||||
} else {
|
||||
#if 0
|
||||
|
|
Loading…
Add table
Reference in a new issue