1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

Open vobsub output files in binary mode, otherwise the OS might

do all kinds of evil mangling to them (fixes bug #668).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21460 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-12-03 11:23:04 +00:00
parent 9902ca7c44
commit 0ba390c7a3

View File

@ -1357,12 +1357,12 @@ vobsub_out_open(const char *basename, const unsigned int *palette,
result->aid = index;
strcpy(filename, basename);
strcat(filename, ".sub");
result->fsub = fopen(filename, "a");
result->fsub = fopen(filename, "ab");
if (result->fsub == NULL)
perror("Error: vobsub_out_open subtitle file open failed");
strcpy(filename, basename);
strcat(filename, ".idx");
result->fidx = fopen(filename, "a");
result->fidx = fopen(filename, "ab");
if (result->fidx) {
if (ftell(result->fidx) == 0){
create_idx(result, palette, orig_width, orig_height);