summaryrefslogtreecommitdiff
path: root/src/xine-engine/video_out.c
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-01-14 00:34:22 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-01-14 00:34:22 +0000
commit572cb8c2f417e480c16089aac768674b89302ac3 (patch)
tree1ef1397eda19e34fde80f02e6947e0073d0ddee2 /src/xine-engine/video_out.c
parentd22f98cc9380caedf0020b0f8ea5c40bb992f82a (diff)
downloadxine-lib-572cb8c2f417e480c16089aac768674b89302ac3.tar.gz
xine-lib-572cb8c2f417e480c16089aac768674b89302ac3.tar.bz2
miguel's latest still frame patches and some minor cleanups
CVS patchset: 1401 CVS date: 2002/01/14 00:34:22
Diffstat (limited to 'src/xine-engine/video_out.c')
-rw-r--r--src/xine-engine/video_out.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 869fbba57..f5a13d71d 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000, 2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
* This file is part of xine, a unix video player.
*
@@ -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.64 2002/01/08 01:04:30 miguelfreitas Exp $
+ * $Id: video_out.c,v 1.65 2002/01/14 00:34:22 guenter Exp $
*
*/
@@ -194,7 +194,6 @@ static void *video_out_loop (void *this_gen) {
static int prof_spu_blend = -1;
sigset_t vo_mask;
- uint32_t last_draw_vpts = 0;
int flush_sent = 0;
/* printf ("%d video_out start\n", getpid()); */
@@ -205,7 +204,8 @@ static void *video_out_loop (void *this_gen) {
prof_spu_blend = xine_profiler_allocate_slot ("spu blend");
img_backup = NULL;
-
+ this->last_draw_vpts = 0;
+
/*
* set up timer signal
*/
@@ -265,18 +265,18 @@ static void *video_out_loop (void *this_gen) {
/* update timer for inactivity flush */
if( img ) {
- last_draw_vpts = cur_pts;
+ this->last_draw_vpts = cur_pts;
} else {
/* start timer when decoder receives the first packet */
- if( !last_draw_vpts && this->decoder_started_flag )
- last_draw_vpts = cur_pts;
+ if( !this->last_draw_vpts && this->decoder_started_flag )
+ this->last_draw_vpts = cur_pts;
- if( last_draw_vpts && (cur_pts - last_draw_vpts) > (8 * this->pts_per_frame) ) {
+ if( this->last_draw_vpts && (cur_pts - this->last_draw_vpts) > (8 * this->pts_per_frame) ) {
#ifdef VIDEO_OUT_LOG
printf("video_out : sending decoder flush due to inactivity\n");
#endif
video_out_send_decoder_flush( this->xine->video_fifo );
- last_draw_vpts = cur_pts;
+ this->last_draw_vpts = cur_pts;
flush_sent = 1;
}
}
@@ -745,6 +745,7 @@ static int vo_frame_draw (vo_frame_t *img) {
this->num_frames_delivered++;
cur_vpts = this->metronom->get_current_time(this->metronom);
+ this->last_draw_vpts = cur_vpts;
diff = pic_vpts - cur_vpts;
frames_to_skip = ((-1 * diff) / this->pts_per_frame + 3) * 2;