summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-22 08:29:25 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-22 08:29:25 +0000
commit02bcb8e85c63ee981a90daac1a9aeace5f8a07bd (patch)
tree37d277d2cceb1d708b73a83ad9cbc9588a0ddbd6 /libmpdemux
parent92284cb04e1c1b162465e59e2e93bf4d7217718a (diff)
downloadmpv-02bcb8e85c63ee981a90daac1a9aeace5f8a07bd.tar.bz2
mpv-02bcb8e85c63ee981a90daac1a9aeace5f8a07bd.tar.xz
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) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24589 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_ts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c
index f55407cd14..0e87d6a4b1 100644
--- a/libmpdemux/demux_ts.c
+++ b/libmpdemux/demux_ts.c
@@ -642,9 +642,12 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
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;