changeset 26039:aa0784c046d1

reset_fifos() resets demuxer->reference_clock to MP_NOPTS_VALUE
author nicodvb
date Sat, 23 Feb 2008 10:42:24 +0000
parents 4f9a30caadff
children 125752091a74
files libmpdemux/demux_ts.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c	Sat Feb 23 10:38:24 2008 +0000
+++ b/libmpdemux/demux_ts.c	Sat Feb 23 10:42:24 2008 +0000
@@ -3086,8 +3086,9 @@
 
 extern void skip_audio_frame(sh_audio_t *sh_audio);
 
-static void reset_fifos(ts_priv_t* priv, int a, int v, int s)
+static void reset_fifos(demuxer_t *demuxer, int a, int v, int s)
 {
+	ts_priv_t* priv = demuxer->priv;
 	if(a)
 	{
 		if(priv->fifo[0].pack != NULL)
@@ -3117,6 +3118,7 @@
 		}
 		priv->fifo[2].offset = 0;
 	}
+	demuxer->reference_clock = MP_NOPTS_VALUE;
 }
 
 
@@ -3134,7 +3136,7 @@
 	//================= seek in MPEG-TS ==========================
 
 	ts_dump_streams(demuxer->priv);
-	reset_fifos(priv, sh_audio != NULL, sh_video != NULL, demuxer->sub->id > 0);
+	reset_fifos(demuxer, sh_audio != NULL, sh_video != NULL, demuxer->sub->id > 0);
 
 
 	if(sh_audio != NULL)
@@ -3280,7 +3282,7 @@
 			n = *((int*)arg);
 			if(n == -2)
 			{
-				reset_fifos(priv, areset, vreset, 0);
+				reset_fifos(demuxer, areset, vreset, 0);
 				ds->id = -2;
 				ds->sh = NULL;
 				ds_free_packs(ds);
@@ -3322,7 +3324,7 @@
 			if(sh)
 			{
 				if(ds->id != priv->ts.streams[i].id)
-					reset_fifos(priv, areset, vreset, 0);
+					reset_fifos(demuxer, areset, vreset, 0);
 				ds->id = priv->ts.streams[i].id;
 				ds->sh = sh;
 				ds_free_packs(ds);