summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEwald Snel <esnel@users.sourceforge.net>2002-04-01 22:19:27 +0000
committerEwald Snel <esnel@users.sourceforge.net>2002-04-01 22:19:27 +0000
commitbc085b3b89b232b2d972221048f0cb947487b2b1 (patch)
tree13dacb9f7fba8ffe032a6abc4c118367fd981070
parentf99e942b1317f978205e48c5dbad077955fce040 (diff)
downloadxine-lib-bc085b3b89b232b2d972221048f0cb947487b2b1.tar.gz
xine-lib-bc085b3b89b232b2d972221048f0cb947487b2b1.tar.bz2
- Fix frame leak in Xv video driver
- Frames can be freed by video driver until video driver' exit(), so you need to call this before vo_free_img_buffers() to avoid frame leak CVS patchset: 1660 CVS date: 2002/04/01 22:19:27
-rw-r--r--src/video_out/video_out_xv.c8
-rw-r--r--src/xine-engine/video_out.c6
2 files changed, 8 insertions, 6 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 3cfd625ec..a0f48d4ba 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.109 2002/03/27 15:31:36 miguelfreitas Exp $
+ * $Id: video_out_xv.c,v 1.110 2002/04/01 22:19:27 esnel Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -744,7 +744,6 @@ static void xv_add_recent_frame (xv_driver_t *this, xv_frame_t *frame) {
}
/* currently not used - we could have a method to call this from video loop */
-#if 0
static void xv_flush_recent_frames (xv_driver_t *this) {
int i;
@@ -757,7 +756,6 @@ static void xv_flush_recent_frames (xv_driver_t *this) {
this->recent_frames[i] = NULL;
}
}
-#endif
static int xv_redraw_needed (vo_driver_t *this_gen) {
xv_driver_t *this = (xv_driver_t *) this_gen;
@@ -1087,6 +1085,10 @@ static void xv_exit (vo_driver_t *this_gen) {
printf ("video_out_xv: xv_exit: XvUngrabPort() failed.\n");
}
XUnlockDisplay (this->display);
+
+ xv_flush_recent_frames (this);
+
+ free (this);
}
static int xv_check_yv12 (Display *display, XvPortID port) {
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index d92921c85..2536b8e87 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.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.c,v 1.90 2002/03/29 19:52:16 f1rmb Exp $
+ * $Id: video_out.c,v 1.91 2002/04/01 22:19:28 esnel Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -849,10 +849,10 @@ static void vo_exit (vo_instance_t *this_gen) {
pthread_join (this->video_thread, &p);
}
- vo_free_img_buffers (this_gen);
-
this->driver->exit (this->driver);
+ vo_free_img_buffers (this_gen);
+
#ifdef LOG
printf ("video_out: vo_exit... done\n");
#endif