summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2002-09-24 13:10:25 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2002-09-24 13:10:25 +0000
commitc577573afd619b04e2680b0577919e63194af278 (patch)
treedd6f6607ee40b16ce5f872dc7245955f0b050a03 /src
parent99ffec8ab806f303a5a9917f7f71d5ded01a4129 (diff)
downloadxine-lib-c577573afd619b04e2680b0577919e63194af278.tar.gz
xine-lib-c577573afd619b04e2680b0577919e63194af278.tar.bz2
prevent pts based wrap detections after we had a nav-detected
discontinuity CVS patchset: 2745 CVS date: 2002/09/24 13:10:25
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_mpeg_block.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index b8400f80b..01e42f1ed 100644
--- a/src/demuxers/demux_mpeg_block.c
+++ b/src/demuxers/demux_mpeg_block.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_block.c,v 1.116 2002/09/19 05:01:57 jcdutton Exp $
+ * $Id: demux_mpeg_block.c,v 1.117 2002/09/24 13:10:25 mroi Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -119,7 +119,7 @@ static void check_newpts( demux_mpeg_block_t *this, int64_t pts, int video )
int64_t diff;
diff = pts - this->last_pts[video];
-
+
if( pts && (this->send_newpts || (this->last_pts[video] && abs(diff)>WRAP_THRESHOLD) ) ) {
/* check if pts is outside nav pts range. any stream without nav must enter here. */
@@ -384,9 +384,9 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
if (this->nav_last_end_pts != start_pts && !preview_mode) {
-//#ifdef LOG
+#ifdef LOG
printf("demux_mpeg_block: discontinuity detected by nav packet\n" );
-//#endif
+#endif
if (this->buf_flag_seek) {
xine_demux_control_newpts(this->xine, start_pts, BUF_FLAG_SEEK);
this->buf_flag_seek = 0;
@@ -397,6 +397,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
this->nav_last_end_pts = end_pts;
this->nav_last_start_pts = start_pts;
this->send_newpts = 0;
+ this->last_pts[PTS_AUDIO] = this->last_pts[PTS_VIDEO] = 0;
return ;
}