summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2002-07-20 08:04:55 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2002-07-20 08:04:55 +0000
commit23c78e4c84395ad1f8723f5bf158b723b417002a (patch)
tree93a05bdbe3d543473d16d59eae925775ce231513
parentb88dc465f1df3bc2bafb5d141f3e58f02f34f5c2 (diff)
downloadxine-lib-23c78e4c84395ad1f8723f5bf158b723b417002a.tar.gz
xine-lib-23c78e4c84395ad1f8723f5bf158b723b417002a.tar.bz2
Use BUF_FLAG_SEEK
CVS patchset: 2326 CVS date: 2002/07/20 08:04:55
-rw-r--r--src/demuxers/demux_mpeg.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index 96b96b789..698cfaa82 100644
--- a/src/demuxers/demux_mpeg.c
+++ b/src/demuxers/demux_mpeg.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: demux_mpeg.c,v 1.67 2002/07/14 22:27:25 miguelfreitas Exp $
+ * $Id: demux_mpeg.c,v 1.68 2002/07/20 08:04:55 tmattern Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -80,6 +80,7 @@ typedef struct demux_mpeg_s {
int64_t last_pts[2];
int send_newpts;
+ int buf_flag_seek;
} demux_mpeg_t;
@@ -132,7 +133,12 @@ static void check_newpts( demux_mpeg_t *this, int64_t pts, int video )
if( !this->preview_mode && pts &&
(this->send_newpts || (this->last_pts[video] && abs(diff)>WRAP_THRESHOLD) ) ) {
- xine_demux_control_newpts(this->xine, pts, 0);
+ if (this->buf_flag_seek) {
+ xine_demux_control_newpts(this->xine, pts, BUF_FLAG_SEEK);
+ this->buf_flag_seek = 0;
+ } else {
+ xine_demux_control_newpts(this->xine, pts, 0);
+ }
this->send_newpts = 0;
this->last_pts[1-video] = 0;
}
@@ -791,6 +797,7 @@ static int demux_mpeg_start (demux_plugin_t *this_gen,
this->preview_mode = 0;
this->send_end_buffers = 1;
this->thread_running = 1;
+ this->buf_flag_seek = 0;
if ((err = pthread_create (&this->thread,
NULL, demux_mpeg_loop, this)) != 0) {
@@ -800,6 +807,7 @@ static int demux_mpeg_start (demux_plugin_t *this_gen,
}
}
else {
+ this->buf_flag_seek = 1;
xine_demux_flush_engine(this->xine);
}