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>
... | ... |
@@ -752,8 +752,8 @@ static void video_image_display(VideoState *is) |
752 | 752 |
} |
753 | 753 |
rect.x = is->xleft + x; |
754 | 754 |
rect.y = is->ytop + y; |
755 |
- rect.w = width; |
|
756 |
- rect.h = height; |
|
755 |
+ rect.w = FFMAX(width, 1); |
|
756 |
+ rect.h = FFMAX(height, 1); |
|
757 | 757 |
SDL_DisplayYUVOverlay(vp->bmp, &rect); |
758 | 758 |
} else { |
759 | 759 |
#if 0 |