diff options
author | Ewald Snel <esnel@users.sourceforge.net> | 2002-04-02 19:29:09 +0000 |
---|---|---|
committer | Ewald Snel <esnel@users.sourceforge.net> | 2002-04-02 19:29:09 +0000 |
commit | 69f6ab2b002fe21e719b8e386db39ddec31facbb (patch) | |
tree | d4d89a1c5b4cdbb1a2ae52e86e97464eff5f6bd0 | |
parent | 05feff063271ba86613ef88aa16dad8967ec7349 (diff) | |
download | xine-lib-69f6ab2b002fe21e719b8e386db39ddec31facbb.tar.gz xine-lib-69f6ab2b002fe21e719b8e386db39ddec31facbb.tar.bz2 |
- Undo my previous patch, it might (at least in theory) cause problems
when freeing frames after closing the video output driver
- New patch to fix the frame leak in the Xv driver only
CVS patchset: 1667
CVS date: 2002/04/02 19:29:09
-rw-r--r-- | src/video_out/video_out_xv.c | 13 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 6 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index a0f48d4ba..4fedc7297 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.110 2002/04/01 22:19:27 esnel Exp $ + * $Id: video_out_xv.c,v 1.111 2002/04/02 19:29:09 esnel Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -744,6 +744,7 @@ 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; @@ -756,6 +757,7 @@ 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; @@ -1073,6 +1075,7 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, static void xv_exit (vo_driver_t *this_gen) { xv_driver_t *this = (xv_driver_t *) this_gen; + int i; if (this->deinterlace_frame.image) { dispose_ximage (this, &this->deinterlace_frame.shminfo, @@ -1086,7 +1089,13 @@ static void xv_exit (vo_driver_t *this_gen) { } XUnlockDisplay (this->display); - xv_flush_recent_frames (this); + for( i=0; i < VO_NUM_RECENT_FRAMES; i++ ) + { + if( this->recent_frames[i] ) + this->recent_frames[i]->vo_frame.dispose + (&this->recent_frames[i]->vo_frame); + this->recent_frames[i] = NULL; + } free (this); } diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 2536b8e87..b090cddeb 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.91 2002/04/01 22:19:28 esnel Exp $ + * $Id: video_out.c,v 1.92 2002/04/02 19:29:09 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); } - this->driver->exit (this->driver); - vo_free_img_buffers (this_gen); + this->driver->exit (this->driver); + #ifdef LOG printf ("video_out: vo_exit... done\n"); #endif |