mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 07:26:29 +00:00
gst/games/gstpuzzle.c: don't draw a puzzle if either width or height of tiles would be 0.
Original commit message from CVS: * gst/games/gstpuzzle.c: (draw_puzzle): don't draw a puzzle if either width or height of tiles would be 0.
This commit is contained in:
parent
02e0b87b2b
commit
33a8594b55
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-01-06 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
|
* gst/games/gstpuzzle.c: (draw_puzzle):
|
||||||
|
don't draw a puzzle if either width or height of tiles would be 0.
|
||||||
|
|
||||||
2005-01-06 Benjamin Otte <otte@gnome.org>
|
2005-01-06 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
* gst/games/gstpuzzle.c: (gst_puzzle_get_type),
|
* gst/games/gstpuzzle.c: (gst_puzzle_get_type),
|
||||||
|
|
|
@ -498,6 +498,12 @@ draw_puzzle (GstVideofilter * videofilter, void *destp, void *srcp)
|
||||||
/* use multiples of 4 here to get around drawing problems with YUV colorspaces */
|
/* use multiples of 4 here to get around drawing problems with YUV colorspaces */
|
||||||
width = (width / puzzle->columns) & ~3;
|
width = (width / puzzle->columns) & ~3;
|
||||||
height = (height / puzzle->rows) & ~3;
|
height = (height / puzzle->rows) & ~3;
|
||||||
|
if (width == 0 || height == 0) {
|
||||||
|
gst_video_image_copy_area (&dest, 0, 0, &src, 0, 0,
|
||||||
|
gst_videofilter_get_input_width (videofilter),
|
||||||
|
gst_videofilter_get_input_height (videofilter));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (width * puzzle->columns != gst_videofilter_get_input_width (videofilter)) {
|
if (width * puzzle->columns != gst_videofilter_get_input_width (videofilter)) {
|
||||||
guint w =
|
guint w =
|
||||||
gst_videofilter_get_input_width (videofilter) - width * puzzle->columns;
|
gst_videofilter_get_input_width (videofilter) - width * puzzle->columns;
|
||||||
|
|
Loading…
Reference in a new issue