[MPlayer-cvslog] r24589 - trunk/libmpdemux/demux_ts.c

nicodvb subversion at mplayerhq.hu
Sat Sep 22 10:29:25 CEST 2007


Author: nicodvb
Date: Sat Sep 22 10:29:25 2007
New Revision: 24589

Log:
in ts_detect_streams() moved the iteration condition inside the loop
because it depends on the updated value of stream_tell();
(fixes infinite wait on enctrypted TS streams)


Modified:
   trunk/libmpdemux/demux_ts.c

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	(original)
+++ trunk/libmpdemux/demux_ts.c	Sat Sep 22 10:29:25 2007
@@ -642,9 +642,12 @@ static off_t ts_detect_streams(demuxer_t
 	init_pos = stream_tell(demuxer->stream);
 	mp_msg(MSGT_DEMUXER, MSGL_V, "PROBING UP TO %"PRIu64", PROG: %d\n", (uint64_t) param->probe, param->prog);
 	end_pos = init_pos + (param->probe ? param->probe : TS_MAX_PROBE_SIZE);
-	while((pos <= end_pos) && (! demuxer->stream->eof))
+	while(1)
 	{
 		pos = stream_tell(demuxer->stream);
+		if(pos > end_pos || demuxer->stream->eof)
+			break;
+
 		if(ts_parse(demuxer, &es, tmp, 1))
 		{
 			//Non PES-aligned A52 audio may escape detection if PMT is not present;



More information about the MPlayer-cvslog mailing list