From 020da6d76ebae65ea1cb1f72a7326afd6d79ed18 Mon Sep 17 00:00:00 2001 From: arpi Date: Fri, 1 Nov 2002 00:01:53 +0000 Subject: 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) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8015 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vobsub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vobsub.c') diff --git a/vobsub.c b/vobsub.c index 0ba6cc010c..e396499fc7 100644 --- a/vobsub.c +++ b/vobsub.c @@ -1262,8 +1262,11 @@ vobsub_out_open(const char *basename, const unsigned int *palette, 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); -- cgit v1.2.3