1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-17 04:15:13 +00:00

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
This commit is contained in:
nicodvb 2007-09-22 08:29:25 +00:00
parent 92284cb04e
commit 02bcb8e85c

View File

@ -642,9 +642,12 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
init_pos = stream_tell(demuxer->stream); 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); 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); 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); pos = stream_tell(demuxer->stream);
if(pos > end_pos || demuxer->stream->eof)
break;
if(ts_parse(demuxer, &es, tmp, 1)) if(ts_parse(demuxer, &es, tmp, 1))
{ {
//Non PES-aligned A52 audio may escape detection if PMT is not present; //Non PES-aligned A52 audio may escape detection if PMT is not present;