[MPlayer-cvslog] r31711 - trunk/command.c

reimar subversion at mplayerhq.hu
Sun Jul 11 19:53:44 CEST 2010


Author: reimar
Date: Sun Jul 11 19:53:44 2010
New Revision: 31711

Log:
Fix calculation of global_sub_size.

Modified:
   trunk/command.c

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	Sun Jul 11 19:10:18 2010	(r31710)
+++ trunk/command.c	Sun Jul 11 19:53:44 2010	(r31711)
@@ -106,7 +106,7 @@ static void update_global_sub_size(MPCon
     // update number of demuxer sub streams
     for (i = 0; i < MAX_S_STREAMS; i++)
         if (mpctx->demuxer->s_streams[i])
-            cnt = i + 1;
+            cnt++;
     if (cnt > mpctx->sub_counts[SUB_SOURCE_DEMUX])
         mpctx->sub_counts[SUB_SOURCE_DEMUX] = cnt;
 
@@ -115,7 +115,7 @@ static void update_global_sub_size(MPCon
     // update global size
     mpctx->global_sub_size = 0;
     for (i = 0; i < SUB_SOURCES; i++)
-        mpctx->global_sub_size = mpctx->sub_counts[i];
+        mpctx->global_sub_size += mpctx->sub_counts[i];
 }
 
 static int sub_pos_by_source(MPContext *mpctx, int src)


More information about the MPlayer-cvslog mailing list