summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_out/video_out_xcbshm.c7
-rw-r--r--src/video_out/video_out_xcbxv.c7
-rw-r--r--src/video_out/video_out_xshm.c7
-rw-r--r--src/video_out/video_out_xv.c7
-rw-r--r--src/video_out/video_out_xxmc.c7
5 files changed, 30 insertions, 5 deletions
diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c
index 38f7956b2..5b4eb1fa3 100644
--- a/src/video_out/video_out_xcbshm.c
+++ b/src/video_out/video_out_xcbshm.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xcbshm.c,v 1.2 2007/03/25 23:07:23 dgp85 Exp $
+ * $Id: video_out_xcbshm.c,v 1.3 2007/03/25 23:13:53 dgp85 Exp $
*
* video_out_xcbshm.c, X11 shared memory extension interface for xine
*
@@ -133,6 +133,11 @@ typedef struct {
*/
static void create_ximage(xshm_driver_t *this, xshm_frame_t *frame, int width, int height)
{
+ if (width <= 0)
+ width = 1;
+ if (height <= 0)
+ height = 1;
+
frame->bytes_per_line = ((this->bpp * width + this->scanline_pad - 1) &
(~(this->scanline_pad - 1))) >> 3;
diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c
index 231efc9ec..52fd0fb6c 100644
--- a/src/video_out/video_out_xcbxv.c
+++ b/src/video_out/video_out_xcbxv.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xcbxv.c,v 1.4 2007/03/25 23:07:23 dgp85 Exp $
+ * $Id: video_out_xcbxv.c,v 1.5 2007/03/25 23:13:53 dgp85 Exp $
*
* video_out_xcbxv.c, X11 video extension interface for xine
*
@@ -215,6 +215,11 @@ static void create_ximage(xv_driver_t *this, xv_frame_t *frame, int width, int h
unsigned int length;
+ if (width <= 0)
+ width = 1;
+ if (height <= 0)
+ height = 1;
+
if (this->use_pitch_alignment) {
width = (width + 7) & ~0x7;
}
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 579189825..00d3bee1c 100644
--- a/src/video_out/video_out_xshm.c
+++ b/src/video_out/video_out_xshm.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xshm.c,v 1.149 2007/02/15 15:19:33 dgp85 Exp $
+ * $Id: video_out_xshm.c,v 1.150 2007/03/25 23:13:53 dgp85 Exp $
*
* video_out_xshm.c, X11 shared memory extension interface for xine
*
@@ -175,6 +175,11 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo,
int width, int height) {
XImage *myimage = NULL;
+ if (width <= 0)
+ width = 1;
+ if (height <= 0)
+ height = 1;
+
if (this->use_shm) {
/*
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 75a4a37e2..19b57bc27 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xv.c,v 1.222 2007/02/15 18:26:55 dgp85 Exp $
+ * $Id: video_out_xv.c,v 1.223 2007/03/25 23:13:53 dgp85 Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -258,6 +258,11 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo,
unsigned int xv_format;
XvImage *image = NULL;
+ if (width <= 0)
+ width = 1;
+ if (height <= 0)
+ height = 1;
+
if (this->use_pitch_alignment) {
width = (width + 7) & ~0x7;
}
diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c
index 4292ca0b6..0abe2f0fc 100644
--- a/src/video_out/video_out_xxmc.c
+++ b/src/video_out/video_out_xxmc.c
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xxmc.c,v 1.22 2006/07/10 22:08:44 dgp85 Exp $
+ * $Id: video_out_xxmc.c,v 1.23 2007/03/25 23:13:53 dgp85 Exp $
*
* video_out_xxmc.c, X11 decoding accelerated video extension interface for xine
*
@@ -608,6 +608,11 @@ static XvImage *create_ximage (xxmc_driver_t *this, XShmSegmentInfo *shminfo,
unsigned int xv_format;
XvImage *image = NULL;
+ if (width <= 0)
+ width = 1;
+ if (height <= 0)
+ height = 1;
+
if (this->use_pitch_alignment) {
width = (width + 7) & ~0x7;
}