[MPlayer-cvslog] r19659 - trunk/libass/ass_mp.c

eugeni subversion at mplayerhq.hu
Sun Sep 3 19:44:25 CEST 2006


Author: eugeni
Date: Sun Sep  3 19:44:25 2006
New Revision: 19659

Modified:
   trunk/libass/ass_mp.c

Log:
Cosmetics: restore indentation after recent changes.


Modified: trunk/libass/ass_mp.c
==============================================================================
--- trunk/libass/ass_mp.c	(original)
+++ trunk/libass/ass_mp.c	Sun Sep  3 19:44:25 2006
@@ -42,41 +42,41 @@
 		ass_read_styles(track, ass_styles_file);
 
 	if (track->n_styles == 0) {
-	ass_style_t* style;
-	int sid;
-	double fs;
-	uint32_t c1, c2;
-
-	sid = ass_alloc_style(track);
-	style = track->styles + sid;
-	style->Name = strdup("Default");
-	style->FontName = (font_fontconfig && font_name) ? strdup(font_name) : strdup("Sans");
-
-	fs = track->PlayResY * text_font_scale_factor / 100. / ass_internal_font_size_coeff;
-	// approximate autoscale coefficients
-	if (subtitle_autoscale == 2)
-		fs *= 1.3;
-	else if (subtitle_autoscale == 3)
-		fs *= 1.4;
-	style->FontSize = fs;
-
-	if (ass_color) c1 = strtoll(ass_color, NULL, 16);
-	else c1 = 0xFFFF0000;
-	if (ass_border_color) c2 = strtoll(ass_border_color, NULL, 16);
-	else c2 = 0x00000000;
-
-	style->PrimaryColour = c1;
-	style->SecondaryColour = c1;
-	style->OutlineColour = c2;
-	style->BackColour = 0x00000000;
-	style->BorderStyle = 1;
-	style->Alignment = 2;
-	style->Outline = 2;
-	style->MarginL = 30;
-	style->MarginR = 30;
-	style->MarginV = 20;
-	style->ScaleX = 1.;
-	style->ScaleY = 1.;
+		ass_style_t* style;
+		int sid;
+		double fs;
+		uint32_t c1, c2;
+
+		sid = ass_alloc_style(track);
+		style = track->styles + sid;
+		style->Name = strdup("Default");
+		style->FontName = (font_fontconfig && font_name) ? strdup(font_name) : strdup("Sans");
+
+		fs = track->PlayResY * text_font_scale_factor / 100. / ass_internal_font_size_coeff;
+		// approximate autoscale coefficients
+		if (subtitle_autoscale == 2)
+			fs *= 1.3;
+		else if (subtitle_autoscale == 3)
+			fs *= 1.4;
+		style->FontSize = fs;
+
+		if (ass_color) c1 = strtoll(ass_color, NULL, 16);
+		else c1 = 0xFFFF0000;
+		if (ass_border_color) c2 = strtoll(ass_border_color, NULL, 16);
+		else c2 = 0x00000000;
+
+		style->PrimaryColour = c1;
+		style->SecondaryColour = c1;
+		style->OutlineColour = c2;
+		style->BackColour = 0x00000000;
+		style->BorderStyle = 1;
+		style->Alignment = 2;
+		style->Outline = 2;
+		style->MarginL = 30;
+		style->MarginR = 30;
+		style->MarginV = 20;
+		style->ScaleX = 1.;
+		style->ScaleY = 1.;
 	}
 
 	return track;
@@ -118,25 +118,25 @@
 	event->Duration = (sub->end - sub->start) * 10;
 	event->Style = 0;
 
-		for (j = 0; j < sub->lines; ++j)
-			len += sub->text[j] ? strlen(sub->text[j]) : 0;
+	for (j = 0; j < sub->lines; ++j)
+		len += sub->text[j] ? strlen(sub->text[j]) : 0;
 
-		len += 2 * sub->lines; // '\N', including the one after the last line
-		len += 6; // {\anX}
-		len += 1; // '\0'
+	len += 2 * sub->lines; // '\N', including the one after the last line
+	len += 6; // {\anX}
+	len += 1; // '\0'
 
-		event->Text = malloc(len);
-		end = event->Text + len;
-		p = event->Text;
+	event->Text = malloc(len);
+	end = event->Text + len;
+	p = event->Text;
 
-		if (sub->alignment)
-			p += snprintf(p, end - p, "{\\an%d}", sub->alignment);
+	if (sub->alignment)
+		p += snprintf(p, end - p, "{\\an%d}", sub->alignment);
 
-		for (j = 0; j < sub->lines; ++j)
-			p += snprintf(p, end - p, "%s ", sub->text[j]);
+	for (j = 0; j < sub->lines; ++j)
+		p += snprintf(p, end - p, "%s ", sub->text[j]);
 
-		p--; // remove last ' '
-		*p = 0;
+	p--; // remove last ' '
+	*p = 0;
 
 	if (check_duplicate_plaintext_event(track)) {
 		ass_free_event(track, eid);



More information about the MPlayer-cvslog mailing list