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

reimar subversion at mplayerhq.hu
Thu Jul 29 19:06:39 CEST 2010


Author: reimar
Date: Thu Jul 29 19:06:39 2010
New Revision: 31864

Log:
Move function to avoid a forward declaration.

Modified:
   trunk/command.c

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	Thu Jul 29 19:05:23 2010	(r31863)
+++ trunk/command.c	Thu Jul 29 19:06:39 2010	(r31864)
@@ -98,32 +98,6 @@ static void rescale_input_coordinates(in
            vo_dheight, vo_fs);
 }
 
-static int sub_pos_by_source(MPContext *mpctx, int src);
-
-static void update_global_sub_size(MPContext *mpctx)
-{
-    int i;
-    int cnt = 0;
-
-    // update number of demuxer sub streams
-    for (i = 0; i < MAX_S_STREAMS; i++)
-        if (mpctx->demuxer->s_streams[i])
-            cnt++;
-    if (cnt > mpctx->sub_counts[SUB_SOURCE_DEMUX])
-        mpctx->sub_counts[SUB_SOURCE_DEMUX] = cnt;
-
-    // update global size
-    mpctx->global_sub_size = 0;
-    for (i = 0; i < SUB_SOURCES; i++)
-        mpctx->global_sub_size += mpctx->sub_counts[i];
-
-    // update global_sub_pos if we auto-detected a demuxer sub
-    if (mpctx->global_sub_pos == -1 &&
-        mpctx->demuxer->sub && mpctx->demuxer->sub->id >= 0)
-        mpctx->global_sub_pos = sub_pos_by_source(mpctx, SUB_SOURCE_DEMUX) +
-                                mpctx->demuxer->sub->id;
-}
-
 static int sub_pos_by_source(MPContext *mpctx, int src)
 {
     int i, cnt = 0;
@@ -167,6 +141,30 @@ static int sub_source(MPContext *mpctx)
     return sub_source_by_pos(mpctx, mpctx->global_sub_pos);
 }
 
+static void update_global_sub_size(MPContext *mpctx)
+{
+    int i;
+    int cnt = 0;
+
+    // update number of demuxer sub streams
+    for (i = 0; i < MAX_S_STREAMS; i++)
+        if (mpctx->demuxer->s_streams[i])
+            cnt++;
+    if (cnt > mpctx->sub_counts[SUB_SOURCE_DEMUX])
+        mpctx->sub_counts[SUB_SOURCE_DEMUX] = cnt;
+
+    // update global size
+    mpctx->global_sub_size = 0;
+    for (i = 0; i < SUB_SOURCES; i++)
+        mpctx->global_sub_size += mpctx->sub_counts[i];
+
+    // update global_sub_pos if we auto-detected a demuxer sub
+    if (mpctx->global_sub_pos == -1 &&
+        mpctx->demuxer->sub && mpctx->demuxer->sub->id >= 0)
+        mpctx->global_sub_pos = sub_pos_by_source(mpctx, SUB_SOURCE_DEMUX) +
+                                mpctx->demuxer->sub->id;
+}
+
 /**
  * \brief Log the currently displayed subtitle to a file
  *


More information about the MPlayer-cvslog mailing list