changeset 29253:f1a9a6fbc051

Get rid of some more trailing whitespace
author reynaldo
date Tue, 12 May 2009 02:45:52 +0000
parents 3b9429f763e2
children 195f6311ba4e
files sub_cc.c
diffstat 1 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/sub_cc.c	Tue May 12 02:43:03 2009 +0000
+++ b/sub_cc.c	Tue May 12 02:45:52 2009 +0000
@@ -3,10 +3,10 @@
  *
  * This decoder relies on MPlayer's OSD to display subtitles.
  * Be warned that the decoding is somewhat preliminary, though it basically works.
- * 
+ *
  * Most notably, only the text information is decoded as of now, discarding color,
  * background and position info (see source below).
- * 
+ *
  * by Matteo Giani
  *
  * uses source from the xine closed captions decoder
@@ -90,8 +90,8 @@
 		buf->lines--;
 	}
 }
- 
- 
+
+
 void subcc_init(void)
 {
 	int i;
@@ -108,7 +108,7 @@
 static void append_char(char c)
 {
 	if(!bb->lines) {bb->lines++; cursor_pos=0;}
-	if(bb->text[bb->lines - 1]==NULL) 
+	if(bb->text[bb->lines - 1]==NULL)
 	{
 		bb->text[bb->lines - 1]=malloc(CC_MAX_LINE_LENGTH);
 		memset(bb->text[bb->lines - 1],0,CC_MAX_LINE_LENGTH);
@@ -126,7 +126,7 @@
 			}
 		}
 	}
-	else 
+	else
 	{
 		if(cursor_pos==CC_MAX_LINE_LENGTH-1)
 		{
@@ -157,7 +157,7 @@
 
 static void cc_decode_EIA608(unsigned short int data)
 {
-  
+
   static unsigned short int lastcode=0x0000;	
   unsigned char c1 = data & 0x7f;
   unsigned char c2 = (data >> 8) & 0x7f;
@@ -180,13 +180,13 @@
 			switch(c1)
 			{
 				case 0x10:	break; // ext attribute
-				case 0x11: 
-					if((c2 & 0x30)==0x30) 
+				case 0x11:
+					if((c2 & 0x30)==0x30)
 					{
 						//printf("[debug]:Special char (ignored)\n");
 						/*cc_decode_special_char()*/;
 					}
-					else if (c2 & 0x20) 
+					else if (c2 & 0x20)
 					{
 						//printf("[debug]: midrow_attr (ignored)\n");
 						/*cc_decode_midrow_attr()*/;
@@ -223,8 +223,8 @@
 					}
 			}
 	  }
-  } 
-  lastcode=data;  
+  }
+  lastcode=data;
 }
 
 static void subcc_decode(unsigned char *inputbuffer, unsigned int inputlength)
@@ -247,13 +247,13 @@
    *   0x00 is padding, followed by 2 more 0x00.
    *
    *   0x01 always seems to appear at the beginning, always seems to
-   *        be followed by 0xf8, 8-bit number. 
+   *        be followed by 0xf8, 8-bit number.
    *        The lower 7 bits of this 8-bit number seem to denote the
    *        number of code triplets that follow.
-   *        The most significant bit denotes whether the Line 21 field 1 
+   *        The most significant bit denotes whether the Line 21 field 1
    *        captioning information is at odd or even triplet offsets from this
    *        beginning triplet. 1 denotes odd offsets, 0 denotes even offsets.
-   *      
+   *
    *        Most captions are encoded with odd offsets, so this is what we
    *        will assume.
    *
@@ -276,18 +276,18 @@
 #endif
       break;
     }
-    
+
     data1 = *(current+1);
     data2 = *(current + 2);
     current++; curbytes++;
-    
+
     switch (cc_code) {
     case 0xfe:
       /* expect 2 byte encoding (perhaps CC3, CC4?) */
       /* ignore for time being */
       skip = 2;
       break;
-      
+
     case 0xff:
       /* expect EIA-608 CC1/CC2 encoding */
       // FIXME check parity!
@@ -296,12 +296,12 @@
       cc_decode_EIA608(data1 | (data2 << 8));
       skip = 5;
       break;
-      
+
     case 0x00:
       /* This seems to be just padding */
       skip = 2;
       break;
-      
+
     case 0x01:
       odd_offset = data2 & 0x80;
       if (odd_offset)
@@ -309,7 +309,7 @@
       else
 	skip = 5;
       break;
-      
+
     default:
 //#ifdef LOG_DEBUG
       fprintf(stderr, "Unknown CC encoding: %x\n", cc_code);