changeset 32608:75c7654261d0

Replace hard-coded number for loop limits for array index by the define used in the array declaration.
author reimar
date Sat, 11 Dec 2010 22:26:57 +0000
parents 9a8baaf45cf2
children 3ca30fb56837
files libmpdemux/demux_ts.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c	Sat Dec 11 22:22:54 2010 +0000
+++ b/libmpdemux/demux_ts.c	Sat Dec 11 22:26:57 2010 +0000
@@ -925,7 +925,7 @@
 		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 @@
 		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 @@
   		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;