summaryrefslogtreecommitdiffstats
path: root/vobsub.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-01 00:01:53 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-01 00:01:53 +0000
commit020da6d76ebae65ea1cb1f72a7326afd6d79ed18 (patch)
tree806bc0a46688af03d64618dbc9310b5ddb6f5fe2 /vobsub.c
parent2d602b345bc2c5e216576a0be82e8416477c5f03 (diff)
downloadmpv-020da6d76ebae65ea1cb1f72a7326afd6d79ed18.tar.bz2
mpv-020da6d76ebae65ea1cb1f72a7326afd6d79ed18.tar.xz
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) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8015 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vobsub.c')
-rw-r--r--vobsub.c5
1 files changed, 4 insertions, 1 deletions
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);