changeset 18474:5262ede8f2e1

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
author nicodvb
date Sat, 13 May 2006 10:09:33 +0000
parents ba3244f65665
children 23fedcdd08a0
files libmpdemux/demux_ts.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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));