summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-03-25 23:13:53 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-03-25 23:13:53 +0000
commit91f91ec1332e1bc2a1434a1658d825a16ed56ff8 (patch)
tree26e854d0815369932f54bc8682a8245016a77fc6
parentf365c4d88b2110300e6f4b050c69f4ebea935e66 (diff)
downloadxine-lib-91f91ec1332e1bc2a1434a1658d825a16ed56ff8.tar.gz
xine-lib-91f91ec1332e1bc2a1434a1658d825a16ed56ff8.tar.bz2
Create at least a 1×1 shared image when the first frame is skipped (and thus reported as 0×0), to avoid disabling shared memory for all others. Patch by Reinhard Nissl.
CVS patchset: 8748 CVS date: 2007/03/25 23:13:53
-rw-r--r--ChangeLog3
-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
6 files changed, 33 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 27d51119b..ad50e1755 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,9 @@ xine-lib (1.1.5) (Unreleased)
* Portability fixes for Mac OS X, in particular Mac OS X on the new Intel
Macs. Thanks to Martin Aumueller and Emanuele Giaquinta.
* Fix amp muting when level is still at 100. Patch by Reinhard Nissl.
+ * Create at least a 1×1 shared image when the first frame is skipped (and
+ thus reported as 0×0), to avoid disabling shared memory for all others.
+ Patch by Reinhard Nissl.
xine-lib (1.1.4)
* Mark string-type configuration items according to whether they're plain
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;
}