From 91f91ec1332e1bc2a1434a1658d825a16ed56ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 25 Mar 2007 23:13:53 +0000 Subject: =?UTF-8?q?Create=20at=20least=20a=201=C3=971=20shared=20image=20w?= =?UTF-8?q?hen=20the=20first=20frame=20is=20skipped=20(and=20thus=20report?= =?UTF-8?q?ed=20as=200=C3=970),=20to=20avoid=20disabling=20shared=20memory?= =?UTF-8?q?=20for=20all=20others.=20Patch=20by=20Reinhard=20Nissl.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CVS patchset: 8748 CVS date: 2007/03/25 23:13:53 --- ChangeLog | 3 +++ src/video_out/video_out_xcbshm.c | 7 ++++++- src/video_out/video_out_xcbxv.c | 7 ++++++- src/video_out/video_out_xshm.c | 7 ++++++- src/video_out/video_out_xv.c | 7 ++++++- src/video_out/video_out_xxmc.c | 7 ++++++- 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; } -- cgit v1.2.3