aboutsummaryrefslogtreecommitdiffhomepage
path: root/subreader.c
Commit message (Collapse)AuthorAge
* subreader.c: place conditionally declaration under #ifdefGravatar diego2010-11-02
| | | | | | | Surround conditionally used orig_lines variable declaration by #ifdefs. This avoids an unused variable warning when fribidi is not available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31519 b3059339-0415-0410-9bf9-f77b7e298cf2
* subreader.c: Extract duplicated code into a separate function.Gravatar reimar2010-11-02
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31346 b3059339-0415-0410-9bf9-f77b7e298cf2
* subreader.c: check for max line count in SAMI subtitle readerGravatar reimar2010-11-02
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31345 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Fix typo in commentGravatar hyc2010-11-02
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31341 b3059339-0415-0410-9bf9-f77b7e298cf2
* options: move -alang and -slang to option structGravatar Uoti Urpala2010-05-22
| | | | | | | The option field corresponding to -slang is now called "sub_lang" instead of the old misleading global name "dvdsub_lang". The code handling -slang in subreader.c looks rather broken; disable it instead of converting it to use the option field.
* subreader.c: allow compilation with old FriBiDi 0.10Gravatar Uoti Urpala2010-05-16
| | | | | | | | After fixing the type of the third parameter given to fribidi_log2vis the code didn't compile with old FriBiDi 0.10 any more. Seems that the parameter type has changed in FriBiDi and the type expected by current versions didn't exist in older ones at all. Fix compilation with old FriBiDi by adding an #if based on FRIBIDI_INTERFACE_VERSION.
* subreader: remove pointless messageGravatar Uoti Urpala2010-05-08
| | | | | | The code printed a pointless "dvdsublang..." message at MSGL_INFO level. Remove that. Add instead a MSGL_DBG2 message showing tested files and their priorities.
* subreader.c: fix fribidi variable typeGravatar Uoti Urpala2010-05-08
| | | | | Use FriBidiParType instead of FriBidiCharType for a variable used as the third argument of fribidi_log2vis().
* Merge svn changes up to r30815Gravatar Uoti Urpala2010-03-10
|\
* \ Merge svn changes up to r30798Gravatar Uoti Urpala2010-03-10
|\ \
* \ \ Merge svn changes up to r30748Gravatar Uoti Urpala2010-03-10
|\ \ \
* \ \ \ Merge svn changes up to r30663Gravatar Uoti Urpala2010-03-10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: gui/cfg.c libmpcodecs/vd_dmo.c mplayer.c
* \ \ \ \ Merge svn changes up to r30475Gravatar Uoti Urpala2010-03-09
|\ \ \ \ \
| | | | | * Extend stream_read_line to support reading lines from UTF-16 encoded filesGravatar reimar2010-02-28
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and use this to support reading UTF-16 encoded subtitle files in subreader.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30799 b3059339-0415-0410-9bf9-f77b7e298cf2
| | | | * sub_utf8 is handled as a value, not flags everywhere else, so changeGravatar reimar2010-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sub_utf8 & 2 to == 2. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30798 b3059339-0415-0410-9bf9-f77b7e298cf2
| | | | * Make array describing the subtitle reader modules const.Gravatar reimar2010-02-28
| | | |/ | | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30797 b3059339-0415-0410-9bf9-f77b7e298cf2
| | | * Do not cast the results of malloc/calloc/realloc.Gravatar diego2010-02-26
| | |/ | | | | | | | | | | | | | | | | | | | | | These functions return void*, which is compatible with any pointer, so there is no need for casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
| | * Replace platform preprocessor check by HAVE_DOS_PATHS.Gravatar komh2010-02-19
| |/ | | | | | | | | | | | | This is both more elegant and more portable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30650 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add license header to all top-level files missing them.Gravatar diego2010-01-30
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30419Gravatar Uoti Urpala2010-01-25
|\|
* | Merge svn changes up to r30264Gravatar Uoti Urpala2010-01-25
|\ \ | | | | | | | | | | | | Conflicts: gui/wm/ws.c
| | * Fix sub_free to actually free the subtitle data.Gravatar reimar2010-01-22
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30390 b3059339-0415-0410-9bf9-f77b7e298cf2
| | * Fix a memory leak in the subreader.Gravatar reimar2010-01-22
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30389 b3059339-0415-0410-9bf9-f77b7e298cf2
| | * Replace strncat by av_strlcat which is easier to verify for correctness.Gravatar reimar2010-01-22
| |/ | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30388 b3059339-0415-0410-9bf9-f77b7e298cf2
* | subreader.c: fix excessive memory use with some external subtitlesGravatar Uoti Urpala2010-01-16
| | | | | | | | | | | | | | | | | | | | | | | | For each sequence of consecutive partially overlapping subtitles, the algorithm calculating screen positions for the subtitles allocated a 2*subtitle_count*subtitle_line_count array. With some karaoke subtitles that had lots of rapidly changing overlapping subtitles this became large enough to use gigabytes of memory. Make the behavior saner by limiting the line count to SUB_MAX_TEXT lines (the maximum number of lines to show on screen at once, currently 12). This shouldn't change the end result of the algorithm other than possibly printing different warnings.
| * Use !isspace() to replace isalnum() to avoid filename mismatch under MBCSGravatar zuxy2010-01-10
|/ | | | | | | | locale like those in East Asia where most glyphs are neither alphabetical nor numerical. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30258 b3059339-0415-0410-9bf9-f77b7e298cf2
* Finally rename the STREAM_SEEK define to MP_STREAM_SEEK, there are just too manyGravatar reimar2009-11-22
| | | | | | | name clashes, in particular with Windows headers (which define STREAM_SEEK as an enum type). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29962 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix crash with partial fribidi conversion.Gravatar reimar2009-11-22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29952 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make fribidi (i.e. right-to-left) support work with embedded subtitles.Gravatar reimar2009-11-22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29950 b3059339-0415-0410-9bf9-f77b7e298cf2
* sub_fribidi should be static, it is not used outside subreader.cGravatar reimar2009-11-20
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29937 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use early return instead of block over whole function.Gravatar reimar2009-11-20
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29936 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use FFMAX instead of a custom max macro.Gravatar reimar2009-11-20
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29935 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.Gravatar diego2009-05-13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of some more trailing whitespaceGravatar reynaldo2009-05-12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29293 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reduce subtitle parsing verbosity.Gravatar diego2009-04-12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29172 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.Gravatar diego2008-10-13
| | | | | | | 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
* Rename font-related preprocessor directives.Gravatar diego2008-08-07
| | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27425 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;Gravatar diego2008-08-01
| | | | | | | 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
* Start unifying names of internal preprocessor directives.Gravatar diego2008-07-30
| | | | | | | | 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
* Clear iconv conversion state after each subtitle line.Gravatar eugeni2008-05-29
| | | | | | | | | | 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
* cosmetics: Remove useless parentheses from return statements.Gravatar diego2008-05-16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26791 b3059339-0415-0410-9bf9-f77b7e298cf2
* subreader.c: remove unused codeGravatar uau2008-04-12
| | | | | | | 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
* Move sub_utf8_prev declaration out of the DUMPSUBS #ifdef.Gravatar diego2008-03-18
| | | | | | | This helps compilation if DUMPSUBS is defined. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26263 b3059339-0415-0410-9bf9-f77b7e298cf2
* On Win32 and OS/2, 'x:filename' path style without '\' path separatorGravatar diego2008-02-24
| | | | | | | | | 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
* Fix illegal identifiers: Names starting with __ or _ and uppercase are reservedGravatar diego2008-01-06
| | | | | | | 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
* Typo fix in messageGravatar reimar2007-12-22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25498 b3059339-0415-0410-9bf9-f77b7e298cf2
* The function parameter 'preferred_language' should be const char *.Gravatar ulion2007-12-17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25428 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cleanup guess_buffer_cp() a bit, remove tmp variable, break the loop on success.Gravatar iive2007-10-28
| | | | | | | Requested by ulion. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24880 b3059339-0415-0410-9bf9-f77b7e298cf2
* Our enca code uses strdup() on the input encoding name, as we don't modify ↵Gravatar iive2007-10-28
| | | | | | | | | | 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
* Revert r24103, it was nonsense and add a comment that explains the codeGravatar reimar2007-09-22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24591 b3059339-0415-0410-9bf9-f77b7e298cf2