summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2002-11-22 17:05:56 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2002-11-22 17:05:56 +0000
commiteef61f25b051865c9554514a66cb9b45c6a5f4bd (patch)
treead0929818d47f0d48e0797ad7d9fc92a06502464
parent18c27099fbae5858711e68a2fddbd57f7f4aac20 (diff)
downloadxine-lib-eef61f25b051865c9554514a66cb9b45c6a5f4bd.tar.gz
xine-lib-eef61f25b051865c9554514a66cb9b45c6a5f4bd.tar.bz2
flushing the last frame too should increase engine responsiveness now the
flush-by-clock-adjust is gone, keep the last frame as backup to not sacrifice the seek improvements CVS patchset: 3336 CVS date: 2002/11/22 17:05:56
-rw-r--r--src/xine-engine/video_out.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 34b0be478..123f68680 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.112 2002/11/20 11:57:49 mroi Exp $
+ * $Id: video_out.c,v 1.113 2002/11/22 17:05:56 mroi Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -973,13 +973,22 @@ static void vo_flush (xine_video_port_t *this_gen) {
pthread_mutex_lock (&this->display_img_buf_queue->mutex);
num_buffers = this->display_img_buf_queue->num_buffers;
- /* don't flush the last img, it improves seeking */
+ /* last img is kept as backup */
printf ("video_out: flush fifo (%d buffers)\n", num_buffers);
for (i = 1; i < num_buffers; i++) {
img = vo_remove_from_img_buf_queue_int (this->display_img_buf_queue);
vo_frame_dec_lock( img );
}
-
+ if (this->display_img_buf_queue->first) {
+ if (this->img_backup) {
+#ifdef LOG
+ printf("video_out: overwriting frame backup\n");
+#endif
+ vo_frame_dec_lock( this->img_backup );
+ }
+ this->img_backup = vo_remove_from_img_buf_queue_int (this->display_img_buf_queue);
+ }
+ this->redraw_needed = 1;
pthread_mutex_unlock (&this->display_img_buf_queue->mutex);
}