From ee1fdeaee4954b82778ab81d7ddb9197ef6ff7c5 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sat, 1 Jun 2002 16:34:47 +0000 Subject: more careful handling of frame skip conditions CVS patchset: 1979 CVS date: 2002/06/01 16:34:47 --- src/dxr3/dxr3_decode_video.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dxr3/dxr3_decode_video.c b/src/dxr3/dxr3_decode_video.c index 9f33d8ba0..9cdd1644e 100644 --- a/src/dxr3/dxr3_decode_video.c +++ b/src/dxr3/dxr3_decode_video.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: dxr3_decode_video.c,v 1.4 2002/05/25 19:19:17 siggi Exp $ + * $Id: dxr3_decode_video.c,v 1.5 2002/06/01 16:34:47 mroi Exp $ */ /* dxr3 video decoder plugin. @@ -313,11 +313,13 @@ static void dxr3_decode_data(video_decoder_t *this_gen, buf_element_t *buf) #endif vpts = 0; - this->skip_count += skip; + if (this->scr && !this->scr->scanning) this->skip_count += skip; if (this->skip_count > SKIP_TOLERANCE) { /* we have had enough skipping messages now, let's react */ + int64_t vpts_adjust = skip * (int64_t)img->duration / 2; + if (vpts_adjust > 90000) vpts_adjust = 90000; this->xine->metronom->set_option(this->xine->metronom, - METRONOM_ADJ_VPTS_OFFSET, skip * (int64_t)img->duration / 2); + METRONOM_ADJ_VPTS_OFFSET, vpts_adjust); this->skip_count = 0; this->resync_window = 0; } -- cgit v1.2.3