diff options
Diffstat (limited to 'xine_input_vdr.c')
-rw-r--r-- | xine_input_vdr.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c index 4fdb94bc..83826c9b 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.125 2008-03-25 21:58:01 phintuka Exp $ + * $Id: xine_input_vdr.c,v 1.126 2008-04-10 20:21:45 phintuka Exp $ * */ @@ -2476,6 +2476,7 @@ static void vdr_flush_engine(vdr_input_plugin_t *this) _x_demux_control_start(this->stream); #endif this->stream_start = 1; + this->I_frames = this->B_frames = this->P_frames = 0; resume_demuxer(this); } @@ -3553,10 +3554,13 @@ static int vdr_plugin_parse_control(input_plugin_t *this_gen, const char *cmd) } else if(!strncasecmp(cmd, "DISCARD ", 8)) { if(2 == sscanf(cmd, "DISCARD %" PRIu64 " %d", &tmp64, &tmp32)) { pthread_mutex_lock(&this->lock); - this->discard_index = tmp64; - this->discard_frame = tmp32; - vdr_flush_engine(this); - this->I_frames = this->B_frames = this->P_frames = 0; + if(this->discard_index < tmp64) { + this->discard_index = tmp64; + this->discard_frame = tmp32; + vdr_flush_engine(this); + } else if(this->discard_index != tmp64) { + LOGMSG("Ignoring delayed control message %s", cmd); + } pthread_mutex_unlock(&this->lock); } else err = CONTROL_PARAM_ERROR; |