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

reimar subversion at mplayerhq.hu
Sat Dec 11 23:26:57 CET 2010


Author: reimar
Date: Sat Dec 11 23:26:57 2010
New Revision: 32695

Log:
Replace hard-coded number for loop limits for array index by
the define used in the array declaration.

Modified:
   trunk/libmpdemux/demux_ts.c

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	Sat Dec 11 23:22:54 2010	(r32694)
+++ trunk/libmpdemux/demux_ts.c	Sat Dec 11 23:26:57 2010	(r32695)
@@ -925,7 +925,7 @@ static off_t ts_detect_streams(demuxer_t
 		mp_msg(MSGT_DEMUXER, MSGL_INFO, "\n");
 
 
-	for(i=0; i<8192; i++)
+	for(i=0; i<NB_PID_MAX; i++)
 	{
 		if(priv->ts.pids[i] != NULL)
 		{
@@ -992,7 +992,7 @@ static demuxer_t *demux_open_ts(demuxer_
 		return NULL;
 	}
 
-	for(i=0; i < 8192; i++)
+	for(i=0; i < NB_PID_MAX; i++)
 	{
 	    priv->ts.pids[i] = NULL;
 	    priv->ts.streams[i].id = -3;
@@ -3260,7 +3260,7 @@ static void demux_seek_ts(demuxer_t *dem
   		newpos = demuxer->movi_start;	//begininng of stream
 
 	stream_seek(demuxer->stream, newpos);
-	for(i = 0; i < 8192; i++)
+	for(i = 0; i < NB_PID_MAX; i++)
 		if(priv->ts.pids[i] != NULL)
 			priv->ts.pids[i]->is_synced = 0;
 


More information about the MPlayer-cvslog mailing list