when searching ac3 in unqualified pes_private1 streams there's no need to scan > 64 KB of data: frames can't be so far apart

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18475 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2006-05-13 10:09:33 +00:00
parent 84106656c9
commit a36608cd9a
1 changed files with 3 additions and 0 deletions

View File

@ -570,6 +570,8 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
if((es.type == PES_PRIVATE1) && (! audio_found))
{
pptr = &pes_priv1[es.pid];
if(pptr->pos < 64*1024)
{
tmpbuf = (char*) realloc(pptr->buf, pptr->pos + es.size);
if(tmpbuf != NULL)
{
@ -583,6 +585,7 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
es.type = AUDIO_A52;
}
}
}
}
is_audio = IS_AUDIO(es.type) || ((es.type==SL_PES_STREAM) && IS_AUDIO(es.subtype));