Mercurial > mplayer.hg
annotate libmpdemux/demux_ty_osd.h @ 34355:316f6edb49de
Avoid double conversion from utf16/ucs2 to utf8 for text subtitles.
There is code that auto-detects utf16 encoding of the subtitle stream
and forces the reading functions to convert it to native utf8.
The bug happens when using enca to (correctly) guess that the input
file has ucs2 encoding and tries to convert the input stream to utf8, again.
In my case iconv did not accept the input and discarded the subtitles
completely.
author | iive |
---|---|
date | Wed, 14 Dec 2011 00:17:49 +0000 |
parents | 2546de3e5afe |
children |
rev | line source |
---|---|
30577
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
1 /* |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
2 * This file is part of MPlayer. |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
3 * |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
7 * (at your option) any later version. |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
8 * |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
13 * |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
17 */ |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
18 |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
19 #ifndef MPLAYER_DEMUX_TY_OSD_H |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
20 #define MPLAYER_DEMUX_TY_OSD_H |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
21 |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
22 void ty_ClearOSD(int start); |
32567
2546de3e5afe
Mark input buffer that is never modified as const.
reimar
parents:
30577
diff
changeset
|
23 void ty_processuserdata(const unsigned char *buf, int len); |
30577
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
24 |
737b7fd47ef4
Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.
diego
parents:
diff
changeset
|
25 #endif /* MPLAYER_DEMUX_TY_OSD_H */ |