From 5b537d55185934ec5db6f83a2dcbadcc8b4c26cb Mon Sep 17 00:00:00 2001 From: phintuka Date: Fri, 19 Feb 2010 11:58:00 +0000 Subject: Do not send discontinuity messages in still image / backward trick speed modes. PTS will be ignored in metronom wrapper. --- xine/demux_xvdr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xine/demux_xvdr.c b/xine/demux_xvdr.c index 3e2e47d5..04fcc634 100644 --- a/xine/demux_xvdr.c +++ b/xine/demux_xvdr.c @@ -38,6 +38,7 @@ #include "ts2es.h" #include "demux_xvdr_tsdata.h" +#include "xvdr_metronom.h" /* * features @@ -175,6 +176,16 @@ static void check_newpts(demux_xvdr_t *this, buf_element_t *buf, int video ) pts_wrap_workaround(this, buf, video); if (buf->pts) { + + if (video) { + int still_mode = (int)this->stream->metronom->get_option(this->stream->metronom, XVDR_METRONOM_STILL_MODE); + int trick_speed = (int)this->stream->metronom->get_option(this->stream->metronom, XVDR_METRONOM_TRICK_SPEED); + if (still_mode > 0 || trick_speed > 0) { + LOGMSG("Skipping new pts %"PRId64" (still=%d trickspeed=%d)", buf->pts, still_mode, trick_speed); + return; + } + } + int64_t diff = buf->pts - this->last_pts[video]; if (this->send_newpts || (this->last_pts[video] && abs(diff)>WRAP_THRESHOLD)) { -- cgit v1.2.3