changeset 8014:3d6904cee13e

The first language ripped is set as the default language by writing the langidx tag with the index of this language. patch by Arne Driescher <driescher@mpi-magdeburg.mpg.de> (accepted by Kim Minh Kaplan)
author arpi
date Fri, 01 Nov 2002 00:01:53 +0000
parents bd100a3d486f
children 403f7a58ccf2
files vobsub.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vobsub.c	Thu Oct 31 23:54:26 2002 +0000
+++ b/vobsub.c	Fri Nov 01 00:01:53 2002 +0000
@@ -1262,8 +1262,11 @@
 	    strcat(filename, ".idx");
 	    result->fidx = fopen(filename, "a");
 	    if (result->fidx) {
-		if (ftell(result->fidx) == 0)
+		if (ftell(result->fidx) == 0){
 		    create_idx(result, palette, orig_width, orig_height);
+                    /* Make the selected language the default language */
+                    fprintf(result->fidx, "\n# Language index in use\nlangidx: %u\n", index);
+		}
 		fprintf(result->fidx, "\nid: %s, index: %u\n", id ? id : "xx", index);
 		/* So that we can check the file now */
 		fflush(result->fidx);