# HG changeset patch # User nicodvb # Date 1147514973 0 # Node ID 5262ede8f2e1d7e40d9dc0780802d4bbea029330 # Parent ba3244f656656bf9a445f7d46ef0444dad29c75e 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 diff -r ba3244f65665 -r 5262ede8f2e1 libmpdemux/demux_ts.c --- a/libmpdemux/demux_ts.c Sat May 13 09:17:21 2006 +0000 +++ b/libmpdemux/demux_ts.c Sat May 13 10:09:33 2006 +0000 @@ -570,6 +570,8 @@ 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 @@ es.type = AUDIO_A52; } } + } } is_audio = IS_AUDIO(es.type) || ((es.type==SL_PES_STREAM) && IS_AUDIO(es.subtype));