changeset 31645:9666dd193544

Fix calculation of global_sub_size.
author reimar
date Sun, 11 Jul 2010 17:53:44 +0000
parents 68114b6e8311
children b0da003fadf2
files command.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/command.c	Sun Jul 11 17:10:18 2010 +0000
+++ b/command.c	Sun Jul 11 17:53:44 2010 +0000
@@ -106,7 +106,7 @@
     // 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 @@
     // 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)