changeset 24750:af0540caadd1

(cosmetics) indentation fix of my previous commit and small readability improvement.
author voroshil
date Sun, 14 Oct 2007 05:18:32 +0000
parents 00ad4fc92af3
children fce055542191
files stream/tv.c
diffstat 1 files changed, 25 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/stream/tv.c	Sun Oct 14 05:15:51 2007 +0000
+++ b/stream/tv.c	Sun Oct 14 05:18:32 2007 +0000
@@ -206,37 +206,40 @@
 
 static int norm_from_string(tvi_handle_t *tvh, char* norm)
 {
-	tvi_functions_t *funcs = tvh->functions;
-	char str[8];
-	int ret;
-	strncpy(str, norm, sizeof(str)-1);
-	str[sizeof(str)-1] = '\0';
-        ret=funcs->control(tvh->priv, TVI_CONTROL_SPC_GET_NORMID, str);
-	if(ret==TVI_CONTROL_TRUE)
-	return *(int *)str;
-	if(ret!=TVI_CONTROL_UNKNOWN)
-        {
-	    mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm,"default");
-	    return 0;
-        }
+    tvi_functions_t *funcs = tvh->functions;
+    char str[8];
+    int ret;
+
+    strncpy(str, norm, sizeof(str)-1);
+    str[sizeof(str)-1] = '\0';
+    ret=funcs->control(tvh->priv, TVI_CONTROL_SPC_GET_NORMID, str);
+
+    if(ret==TVI_CONTROL_TRUE)
+        return *(int *)str;
+
+    if(ret!=TVI_CONTROL_UNKNOWN)
+    {
+        mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm,"default");
+        return 0;
+    }
 
     if (!strcasecmp(norm, "pal"))
-	return TV_NORM_PAL;
+        return TV_NORM_PAL;
     else if (!strcasecmp(norm, "ntsc"))
-	return TV_NORM_NTSC;
+        return TV_NORM_NTSC;
     else if (!strcasecmp(norm, "secam"))
-	return TV_NORM_SECAM;
+        return TV_NORM_SECAM;
     else if (!strcasecmp(norm, "palnc"))
-	return TV_NORM_PALNC;
+        return TV_NORM_PALNC;
     else if (!strcasecmp(norm, "palm"))
-	return TV_NORM_PALM;
+        return TV_NORM_PALM;
     else if (!strcasecmp(norm, "paln"))
-	return TV_NORM_PALN;
+        return TV_NORM_PALN;
     else if (!strcasecmp(norm, "ntscjp"))
-	return TV_NORM_NTSCJP;
+        return TV_NORM_NTSCJP;
     else {
-	mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm, "PAL");
-	return TV_NORM_PAL;
+        mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm, "PAL");
+        return TV_NORM_PAL;
     }
 }