diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-03-25 23:13:53 +0000 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-03-25 23:13:53 +0000 |
commit | 91f91ec1332e1bc2a1434a1658d825a16ed56ff8 (patch) | |
tree | 26e854d0815369932f54bc8682a8245016a77fc6 /src/video_out/video_out_xcbshm.c | |
parent | f365c4d88b2110300e6f4b050c69f4ebea935e66 (diff) | |
download | xine-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
Diffstat (limited to 'src/video_out/video_out_xcbshm.c')
-rw-r--r-- | src/video_out/video_out_xcbshm.c | 7 |
1 files changed, 6 insertions, 1 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; |