Commit Graph

187 Commits

Author SHA1 Message Date
diego 4d644f513c Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.
This avoids a pointless indirection that only obscures what is really done.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27761 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-13 16:23:55 +00:00
diego 091d352d06 Rename font-related preprocessor directives.
Switch them from a HAVE_ to a CONFIG_ prefix.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27425 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-07 10:36:07 +00:00
diego d17f9943af Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;
CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27391 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-01 20:28:58 +00:00
diego 4b141479da Start unifying names of internal preprocessor directives.
Replace all USE_ prefixes by CONFIG_ prefixes to indicate
options which are configurable.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-30 12:01:30 +00:00
eugeni f5a8ce6408 Clear iconv conversion state after each subtitle line.
This fixes a bug when the last character on a subtitle line
is sometimes moved to the beginning of the next line.

Patch by Guy Shapiro, bugs sguy org.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26921 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-29 18:35:17 +00:00
diego 5423c418c2 cosmetics: Remove useless parentheses from return statements.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26791 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-16 09:42:28 +00:00
uau 43ff8aa004 subreader.c: remove unused code
Remove code under "#ifdef DUMPSUBS". This code hasn't worked in years.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26409 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-12 15:51:02 +00:00
diego 8a7e7eb34c Move sub_utf8_prev declaration out of the DUMPSUBS #ifdef.
This helps compilation if DUMPSUBS is defined.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26263 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-18 12:49:54 +00:00
diego 1cd1c92fb7 On Win32 and OS/2, 'x:filename' path style without '\' path separator
is possible as well as 'x:\dir\filename' style. So we should check ':'
unless '\' is found.
patch by KO Myung-Hun, komh chollian net


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26087 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-24 12:40:30 +00:00
diego e27d606714 Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
for the system, names starting with _ are reserved at file level.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25635 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-06 23:20:15 +00:00
reimar 2b9c02cca0 Typo fix in message
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25498 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-22 16:05:37 +00:00
ulion 9bfbfd8c4d The function parameter 'preferred_language' should be const char *.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25428 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-17 01:06:17 +00:00
iive b69670151c Cleanup guess_buffer_cp() a bit, remove tmp variable, break the loop on success.
Requested by ulion.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24880 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-28 15:53:08 +00:00
iive b43c16f8b6 Our enca code uses strdup() on the input encoding name, as we don't modify it we can use the original constant string.
Uses less memory, code is simpler and faster.
Fixes memory leak (noticed by ulion).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24879 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-28 14:26:05 +00:00
reimar f2b9c324ff Revert r24103, it was nonsense and add a comment that explains the code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24591 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-22 13:24:58 +00:00
reimar 84a215de32 -subfps makes sense for frame-based subtitle formats as well!
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24103 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-20 09:26:29 +00:00
eugeni 2f1b117313 Revert r23443, it breaks compilation without libass.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23449 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-02 13:00:38 +00:00
eugeni ed622ce214 Recode the whole subtitle file to utf-8 before parsing.
This allows reading subtitles in ucs-2.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23443 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-01 19:58:29 +00:00
faust3 b03678d00a 10l: comparison of char* ptrs with string literals
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22274 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-19 10:48:50 +00:00
uau ca7997a50c Fix code updating subtitle array which only moved the text, not endpts.
Led to multiple subtitles on screen disappearing too early without -ass.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22159 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-05 23:25:50 +00:00
eugeni dd276fa5ef In .srt, any line containing only spaces and tabs marks the end of the
current subtitle.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21957 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-18 14:50:32 +00:00
reimar 44ecf39567 Document sub_add_text and sub_clear_text
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21851 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-07 12:06:48 +00:00
reimar 61e4a80191 Subtitle handling cleanup: factor out code for parsing embedded subtitles
and adding and removing of lines in subtitle struct into subreader.c.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21845 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-06 19:07:58 +00:00
reimar 325912bf97 redone subcp_recode: get rid of static buffer, skip lines that failed to
convert instead of removing all remaining lines and remove subcp_recode1
since subcp_recode should now work just as well.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20298 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-18 16:09:59 +00:00
gpoirier 5fc0b3c9d2 Fix missleading msg printed when subcp_open is given NULL as parameter (like as demux_ogg and demux_mkv do)
Patch by: Zuxy Meng %zuxy.meng A gmail P com%
Original Thread:
Message-ID: <a18e06b40609160400l74263121p5f41eaf3549caf5@mail.gmail.com>
Date: Sat, 16 Sep 2006 19:00:57 +0800
To: mplayer-dev-eng@mplayerhq.hu
Subject: [MPlayer-dev-eng] [PATCH] Remove erroneaus warning message in subreader.c


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19883 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-18 11:47:41 +00:00
ben 49867bd432 introduce new 'stream' directory for all stream layer related components and split them from libmpdemux
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-31 17:39:17 +00:00
reynaldo 641a36aa80 corrects some casts that previously discarded the const qualifier. Patch by Stefan Huehner, stefan AT Huehner-org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19203 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-27 18:15:35 +00:00
reynaldo c0c641f0e3 marks several function without a prototype which arent used outside its sourcefile as static, Patch by Stefan Huehner - stefan AT huehner-org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19071 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-13 20:59:18 +00:00
reynaldo 4728357b58 Marks several string parameters as const when they are not modified in the function, Patch by Stefan Huehner, stefan AT huehner-org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18985 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-09 17:45:36 +00:00
eugeni 2f2d8cef15 Split guess_cp() in two functions:
- guess_buffer_cp() determines the encoding of text, given a pointer to a 
buffer and its length;
- guess_cp() reads some data from stream and calls guess_buffer_cp()


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18941 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-07 18:07:39 +00:00
reynaldo f86db2816c this unrelated and erroneus change was applied on my previous commit, reverted
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18875 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-01 04:55:54 +00:00
reynaldo 5b4ec50d44 rm unnecesary void* casts - part 1
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18874 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-01 03:56:13 +00:00
reynaldo 4f593b3393 more sizeof(char) fun
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18861 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-06-30 04:09:29 +00:00
gpoirier 30e68e8da7 Fix problem when subtitle file name is shorter than ".utf-8"
Patch by Evgeniy Stepanov < eugeni P stepanov A gmail P com >
Original thread:
Date: May 23, 2006 10:57 PM
Subject: [MPlayer-dev-eng] [BUG][PATCH] uninitialized memory access in subreader.c


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18707 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-06-14 11:19:39 +00:00
gpoirier 83a9e75c4e fix uninitialized pointer value being passed to open_stream, where it is used in comparison.
Patch by Eugeniy Stepanov < eugeni P stepanov A gmail P com >
Original Thread:
Date: May 23, 2006 10:57 PM
Subject: [MPlayer-dev-eng] [BUG][PATCH] uninitialized memory access in subreader.c


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18706 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-06-14 11:17:21 +00:00
uau 8867515f9b Use 0 and 1 instead of FRIBIDI_FALSE and FRIBIDI_TRUE which are no
longer defined in the current development version of FriBidi. This
reportedly allows compiling MPlayer with the development version which
is needed for Arabic support (some used functions are marked as
deprecated though). Should be safe with older FriBidi versions.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18551 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-05-18 18:31:14 +00:00
rathann b7c5a2b98d Fix:
subreader.c:1333: warning: assignment discards qualifiers from pointer target type


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18515 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-05-14 22:06:59 +00:00
reynaldo 01ac53f6f0 Part 4 of otvos attila's oattila AT chello-hu mp_msg changes, no modifications this time
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18213 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-04-23 04:33:09 +00:00
reynaldo 7882100299 Acording to manpage -dumpmicrodvdsub dumps to dumpsub.sub not dumpsub.txt
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18046 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-04-06 03:27:20 +00:00
iive c0e553be1e if stream is not seekable calling enca would prevent the real parsing of subtitles.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17886 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-17 23:38:46 +00:00
henry 5feccfd289 10l forgotten stream_reset to clear the EOF flag
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17885 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-17 19:39:30 +00:00
albeu b27336b6d2 And 10L for me. Fix the forgoten enca_fd.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17882 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-16 19:16:07 +00:00
albeu badc607fa1 Move the subread from FILE to stream_t.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17880 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-16 14:42:51 +00:00
reimar 46630a96a9 strdup subtitle filename at a more appropriate place, fixing memleaks and
double frees.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15604 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-06-01 09:01:41 +00:00
henry a9c37819b2 more paranoid return value checking
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15563 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-05-24 08:42:20 +00:00
henry ce70204266 strdup() of a NULL pointer, truckload of cola for me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15383 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-05-09 18:28:41 +00:00
faust3 b08e2e7c08 bzero is deprecated patch by Gianluigi Tiesi <mplayer at netfarm.it>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14643 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-02-04 18:31:04 +00:00
faust3 0177d487b8 document global variables used with fribidi
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13681 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-10-18 20:56:11 +00:00
faust3 229c7f9c84 correctly display the commas of most hebrew subtitles on the left side
of the sentence with fribidi, make the old behaviour optional
patch by Shachar Raindel <shacharr <at> gmail.com>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13680 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-10-18 20:41:06 +00:00
faust3 5e00ed042b This time is a patch to improve subtitle alignment management. It
implements
SSA alignment styles; note that alignment for SSA files is not actually
supported, but for SAMI files (which use the same alignment codes) it
is.
patch by Salvatore Falco <sfalco at studenti.ing.uniroma1.it>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13344 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-09-15 13:16:52 +00:00