[vlc-devel] [PATCH 2/3] demux/ttml: Convert_time: fix indentation

Filip Roséen filip at atch.se
Wed Jul 27 07:42:02 CEST 2016


 - tabs are frowned upon, usage of such has been replaced, and;
 - excessive line-breaks have been removed to ease readability.

---
 modules/demux/ttml.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 9c1937c..c6e0616 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -163,14 +163,11 @@ static int Convert_time( int64_t *timing_value, const char *s )
     int m1 = 0;
     int s1 = 0;
     int d1 = 0;
-    if ( sscanf( s, "%d.%ds",
-                 &s1, &d1) == 2 ||
-	 sscanf( s, "%d:%d:%d,%d",
-                 &h1, &m1, &s1, &d1 ) == 4 ||
-         sscanf( s, "%d:%d:%d.%d",
-                 &h1, &m1, &s1, &d1 ) == 4 ||
-         sscanf( s, "%d:%d:%d",
-                 &h1, &m1, &s1) == 3 )
+
+    if ( sscanf( s, "%d.%ds", &s1, &d1) == 2 ||
+         sscanf( s, "%d:%d:%d,%d", &h1, &m1, &s1, &d1 ) == 4 ||
+         sscanf( s, "%d:%d:%d.%d", &h1, &m1, &s1, &d1 ) == 4 ||
+         sscanf( s, "%d:%d:%d", &h1, &m1, &s1) == 3 )
     {
         (*timing_value) = ( (int64_t)h1 * 3600 * 1000 +
                             (int64_t)m1 * 60 * 1000 +
-- 
2.9.0



More information about the vlc-devel mailing list