diff options
Diffstat (limited to 'xine_input_vdr.c')
-rw-r--r-- | xine_input_vdr.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c index 2175d309..2fa58f63 100644 --- a/xine_input_vdr.c +++ b/xine_input_vdr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.c,v 1.311 2010-03-16 11:57:40 phintuka Exp $ + * $Id: xine_input_vdr.c,v 1.312 2010-03-20 23:04:07 phintuka Exp $ * */ @@ -134,7 +134,7 @@ typedef struct { # include <linux/unistd.h> /* syscall(__NR_gettid) */ #endif -static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.311 2010-03-16 11:57:40 phintuka Exp $"; +static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.312 2010-03-20 23:04:07 phintuka Exp $"; static const char log_module_input_vdr[] = "[input_vdr] "; #define LOG_MODULENAME log_module_input_vdr #define SysLogLevel iSysLogLevel @@ -615,13 +615,22 @@ static void vdr_adjust_realtime_speed(vdr_input_plugin_t *this) scr_tuning != SCR_TUNING_PAUSED && !this->no_video && !this->still_mode && !this->is_trickspeed) { + int num_frames = this->stream->video_out->get_property(this->stream->video_out, VO_PROP_BUFS_IN_FIFO); + + if (num_frames < 5) { + LOGSCR("SCR paused by adjust_speed, vbufs = %d", num_frames); scr_tuning_set_paused(this); + return; + } + + LOGSCR("adjust_speed: no pause, enough vbufs queued (%d)", num_frames); + } /* SCR -> RESUME * - If SCR (playback) is currently paused due to previous buffer underflow, * revert to normal if buffer fill is > 66% */ - } else if (scr_tuning == SCR_TUNING_PAUSED) { + if (scr_tuning == SCR_TUNING_PAUSED) { if (num_used/2 > num_free || (this->no_video && num_used > 5) || this->still_mode |