# HG changeset patch # User arpi # Date 1036108913 0 # Node ID 3d6904cee13e8e493cdb85bb4e6f146db5058fc5 # Parent bd100a3d486f441e0e3922222a18d5f379701abc 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 (accepted by Kim Minh Kaplan) diff -r bd100a3d486f -r 3d6904cee13e vobsub.c --- 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);