mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
4
ffplay.c
4
ffplay.c
@ -752,8 +752,8 @@ static void video_image_display(VideoState *is)
|
|||||||
}
|
}
|
||||||
rect.x = is->xleft + x;
|
rect.x = is->xleft + x;
|
||||||
rect.y = is->ytop + y;
|
rect.y = is->ytop + y;
|
||||||
rect.w = width;
|
rect.w = FFMAX(width, 1);
|
||||||
rect.h = height;
|
rect.h = FFMAX(height, 1);
|
||||||
SDL_DisplayYUVOverlay(vp->bmp, &rect);
|
SDL_DisplayYUVOverlay(vp->bmp, &rect);
|
||||||
} else {
|
} else {
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
Reference in New Issue
Block a user