[MPlayer-dev-eng] [PATCH] fix audio detection in libmpdemux/demux_ts.c

Andrew Cohen cohen at andy.bu.edu
Sat Jan 27 20:23:36 CET 2007


The recent modification of demux_ts.c to use ts_add_stream for unified
creation of sh_audio and sh_video fails to correctly detect the audio
on some dvb streams. This one-line patch seems to fix the problem. 


Index: libmpdemux/demux_ts.c
===================================================================
--- libmpdemux/demux_ts.c	(revision 22035)
+++ libmpdemux/demux_ts.c	(working copy)
@@ -293,7 +293,7 @@
 	if(priv->ts.streams[es->pid].sh)
 		return;
 
-	if((IS_AUDIO(es->type) || IS_AUDIO(es->subtype)) && priv->last_aid+1 < MAX_A_STREAMS)
+	if(((IS_AUDIO(es->type) || (es->type==SL_PES_STREAM && IS_AUDIO(es->subtype)) || (es->type == PES_PRIVATE1)) || IS_AUDIO(es->subtype)) && priv->last_aid+1 < MAX_A_STREAMS)	
 	{
 		sh_audio_t *sh = new_sh_audio_aid(demuxer, priv->last_aid, es->pid);
 		if(sh)

-- 
Andrew Cohen		Office:	(617) 353-6051
Physics Department	Fax:	(617) 353-9393
Boston University	Email:	cohen at bu.edu
Boston, MA 02215





More information about the MPlayer-dev-eng mailing list