summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-12-25 15:19:51 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-12-25 15:19:51 +0000
commit0c85985f26591e391f62297fd943dd1f5645b18e (patch)
tree1aef11f388211fe2b37272019f1971df7cd936ee
parentdd3d85290c6254c33de0399e1e3b6c457869363c (diff)
downloadxine-lib-0c85985f26591e391f62297fd943dd1f5645b18e.tar.gz
xine-lib-0c85985f26591e391f62297fd943dd1f5645b18e.tar.bz2
* Fix disposing of image buffers in video_out_xv when SHM get disabled by
exhaustion of memory; patch by Matthias Drochner. [bug #1620339] CVS patchset: 8439 CVS date: 2006/12/25 15:19:51
-rw-r--r--ChangeLog2
-rw-r--r--src/video_out/video_out_xv.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 45925561f..e2e3960ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@ xine-lib (1.1.4)
Reinhard Nissl. [bug #1551911]
* Allow building with Sun CC by fixing the lprintf variadic macro; patch by
Taso N. Devetzis. [bug #1614406]
+ * Fix disposing of image buffers in video_out_xv when SHM get disabled by
+ exhaustion of memory; patch by Matthias Drochner. [bug #1620339]
xine-lib (1.1.3)
* Security fixes:
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 64533a88f..3dc62920d 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.220 2006/10/28 18:51:08 miguelfreitas Exp $
+ * $Id: video_out_xv.c,v 1.221 2006/12/25 15:19:51 dgp85 Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -187,7 +187,7 @@ static void xv_frame_dispose (vo_frame_t *vo_img) {
if (frame->image) {
- if (this->use_shm) {
+ if (frame->shminfo.shmaddr) {
LOCK_DISPLAY(this);
XShmDetach (this->display, &frame->shminfo);
XFree (frame->image);
@@ -382,6 +382,7 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo,
image = XvCreateImage (this->display, this->xv_port,
xv_format, data, width, height);
+ shminfo->shmaddr = 0;
}
return image;
}
@@ -391,7 +392,7 @@ static void dispose_ximage (xv_driver_t *this,
XShmSegmentInfo *shminfo,
XvImage *myimage) {
- if (this->use_shm) {
+ if (shminfo->shmaddr) {
XShmDetach (this->display, shminfo);
XFree (myimage);