From c577573afd619b04e2680b0577919e63194af278 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Tue, 24 Sep 2002 13:10:25 +0000 Subject: prevent pts based wrap detections after we had a nav-detected discontinuity CVS patchset: 2745 CVS date: 2002/09/24 13:10:25 --- src/demuxers/demux_mpeg_block.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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 ; } -- cgit v1.2.3