[MPlayer-cvslog] r29377 - trunk/libmpdemux/demux_ts.c

reimar subversion at mplayerhq.hu
Sun Jun 21 12:47:44 CEST 2009


Author: reimar
Date: Sun Jun 21 12:47:44 2009
New Revision: 29377

Log:
TS demuxer: make the IDs used by DEMUXER_CTRL_SWITCH_* and DEMUXER_CTRL_IDENTIFY_PROGRAM
match those printed as ID_VIDEO_ID/ID_AUDIO_ID and accepted with -vid/-aid

Modified:
   trunk/libmpdemux/demux_ts.c

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	Sat Jun 20 20:18:35 2009	(r29376)
+++ trunk/libmpdemux/demux_ts.c	Sun Jun 21 12:47:44 2009	(r29377)
@@ -3378,14 +3378,9 @@ static int demux_ts_control(demuxer_t *d
 			}
 			else	//audio track <n>
 			{
-				for(i = 0; i < 8192; i++)
-				{
-					if(priv->ts.streams[i].id == n && priv->ts.streams[i].type == reftype)
-					{
+				if (n >= 8192 || priv->ts.streams[n].type != reftype) return DEMUXER_CTRL_NOTIMPL;
+				i = n;
 						sh = priv->ts.streams[i].sh;
-						break;
-					}
-				}
 			}
 
 			if(sh)
@@ -3456,12 +3451,12 @@ static int demux_ts_control(demuxer_t *d
 				if(!vid_done && priv->ts.streams[pmt->es[j].pid].type == TYPE_VIDEO)
 				{
 					vid_done = 1;
-					prog->vid = priv->ts.streams[pmt->es[j].pid].id;
+					prog->vid = pmt->es[j].pid;
 				}
 				else if(!aid_done && priv->ts.streams[pmt->es[j].pid].type == TYPE_AUDIO)
 				{
 					aid_done = 1;
-					prog->aid = priv->ts.streams[pmt->es[j].pid].id;
+					prog->aid = pmt->es[j].pid;
 				}
 			}
 


More information about the MPlayer-cvslog mailing list