# HG changeset patch # User nicodvb # Date 1190449765 0 # Node ID bc5dfd30626dd78614e9e87da892310f4690fad0 # Parent 83c2e53e6e4d15f25c0f3cfc612e35d85f22854c 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) diff -r 83c2e53e6e4d -r bc5dfd30626d libmpdemux/demux_ts.c --- a/libmpdemux/demux_ts.c Thu Sep 20 17:55:25 2007 +0000 +++ b/libmpdemux/demux_ts.c Sat Sep 22 08:29:25 2007 +0000 @@ -642,9 +642,12 @@ 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;