| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Seriously...
Checking for negative values might not be needed, but do it anyway.
|
|
|
|
|
|
|
|
| |
This actually fixes #146.
The overflow check itself is obvious. Also, make ass_align() return an
unaligned value if aligning it would overflow. This is probably better,
as it for example makes the overflow check in the caller simpler.
|
| |
|
|
|
|
|
| |
The split doesn't necessarily follow any logic; for the most part
it just moves each processing loop into its own function.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Commit 8536eaa was slightly broken: for some incomprehensible reason,
(w + 1) memory instead of w is needed. The missing space could lead to
memory corruption and crashes.
|
|
|
|
| |
Mainly cosmetic, but maybe some optimizations the compiler misses.
|
|
|
|
| |
Also fix that ass_synth_init() could deref NULL.
|
| |
|
|
|
|
| |
Put all code into one place, which makes it easier to follow.
|
|
|
|
| |
This still doesn't catch all cases.
|
|
|
|
| |
Helps with overflow and allocation failure checking.
|
|
|
|
| |
This is just a start and gets most easy ones.
|
|
|
|
|
| |
SIZE_MAX is in C99, but not in C89. It is in <stdint.h>, and is always a
macro, so this fallback should be pretty portable and cause no issues.
|
|
|
|
| |
Part of #146
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following warnings:
In file included from ass_cache.c:34:0:
ass_cache_template.h:52:0: warning: "BINSTRING" redefined
#define BINSTRING(member) \
^
In file included from ass_cache.h:59:0,
from ass_font.h:58,
from ass_cache.c:28:
ass_cache_template.h:9:0: note: this is the location of the previous definition
#define BINSTRING(member) \
^
In file included from ass_cache.c:36:0:
ass_cache_template.h:30:0: warning: "BINSTRING" redefined
#define BINSTRING(member) \
^
In file included from ass_cache.c:34:0:
ass_cache_template.h:52:0: note: this is the location of the previous definition
#define BINSTRING(member) \
^
|
| |
|
|
|
|
|
| |
Makes #131 not crash. The function likely fails because the number of
points exceeds SHRT_MAX.
|
| |
|
|
|
|
| |
Fixes libass#129.
|
| |
|
| |
|
|
|
|
| |
Fallout from the previous commits.
|
| |
|
|
|
|
|
|
| |
This not only provides a performance improvement but also
conveniently fixes the following issue: we used to interpret
backslash-escapes in vector drawings, but we shouldn't.
|
| |
|
|
|
|
|
|
|
|
| |
Like VSFilter. '{' without a following '}' is just text, though
in vector drawing mode it still delimits individual drawings.
This also lets us nicely avoid '\0' hacks
in the \t override tag handler in parse_tag.
|
| |
|
|
|
|
|
| |
Also replace strtocolor in ass_utils with string2color
from ass.c, because that is more useful everywhere now.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds 2 new API functions:
ass_set_selective_style_override()
ass_set_selective_style_override_enabled()
They can be used to force dialog text to use a specific ASS_Style. It
uses a fuzzy heuristic for that, and the quality of results may vary.
It does style overriding selectively and tries not to override things
that need explicit styling. The heuristic for that isn't set in stone
either, and can change with future libass versions.
Closes libass#88.
|
|\
| |
| | |
Use FT_Outline_EmboldenXY
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is somewhat similar to BorderStyle=3, but with a number of
differences. Mainly, this new BorderStyle doesn't create overlaps
within an event.
Closes #105.
|
| |
| |
| |
| |
| |
| | |
The glyphs are clipped before combining, so the combined bitmap can
always have the same position, size, and address. This breaks the
change detection. Or at least I think that's what happens.
|
|/
|
|
| |
It turns out we don't need this.
|
|
|
|
|
|
| |
It is unlikely, but FriBidi might not process a string correctly,
and we should handle that. Tested by making it fail always. This
should also fix some compiler warnings.
|
| |
|
|
|
|
| |
Reset to the initial color's alpha component, not red.
|
|
|
|
|
|
|
|
| |
Prior to this fix, both of the following:
\iclip(0,0,9999,9999)\clip(0,0,9999,9999)
\iclip(0,0,0,0)\clip(0,0,9999,9999)
hid the whole picture in libass. The correct behavior
in both cases is to display the whole picture.
|
|
|
|
|
|
|
| |
VSFilter has supported this since version 2.39.
Use the raw floating-point value of the \be argument in the animation
formula, like xy-VSFilter has done since version 3.0.0.45 (404301a3).
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Rodger Combs <rodger.combs@gmail.com>
|
|
|
|
| |
Fixes #75.
|
| |
|
|
|
|
|
| |
Regression in commit 1f5eb5eb.
Fixes issue #74.
|
|
|
|
| |
Regression in commit 98707694.
|
|
|
|
| |
Fixes issue #68.
|
|
|
|
|
|
|
| |
Parse values as float and convert into 26.6 fixed point. This actually
simplifies scaling a bit.
Fixes #63.
|
|
|
|
|
|
|
|
| |
A loop initializer was missing, so output started one row too early.
A loop condition check was missing, so output sometimes stopped
one column too late.
Also remove a couple of dead assignments.
|
|
|
|
|
|
|
|
|
| |
5dd56af2 replaced our implementation of \be with xy-VSFilter's.
This error is not present in the xy-VSFilter code; it was introduced
by accident in a merge that was later squashed as part of 5dd56af2.
Note: the new \be reads in but does not write out
the first and last row and column of pixels.
|
| |
|
|
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
Commit 04b51c2d broke BorderStyle=3 with text that had spaces.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes this test case:
Dialogue: 0,0:00:00.00,0:00:02.00,,,0,0,0,,{\fs50\pos(250,250)\iclip(m 0 0 l 400 0 l 400 220 l0 220)}Hello
Dialogue: 0,0:00:02.00,0:10:00.00,,,0,0,0,,{\fs50\pos(250,250)\iclip(m 0 0 l 400 0 l 400 230 l0 230)}Hello
The problem here is that the rendered output bitmap list itself does
not change, only its contents (due to the different vector clip).
ass_render_frame() will not set *detect_change correctly, and an
application using this flag (like mplayer or mpv) will not update
the screen as needed.
Fix this with a very cheap hack: always report a full change if
there's a vector clip. This is basically an emergency fix until
we have a proper way to detect the change.
|
|
|
|
|
|
| |
Patch by chadr...@gmail.com.
Fixes libass#58, GC#117.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Freetype can return a bounding box with all fields set to INT_MIN if an
outline with all points set to 0 is used. This can happen e.g. with
\fscx0, but also in more complicated cases. (In the original crashing
sample, this was probably caused in combination with an embedded font.)
Such a bounding box causes libass to crash, because it will enlarge the
combined bitmap bounding box to a ridiculous size.
Just skip outlines that have en empty bounding box. This is probably
the correct thing to do, and won't pass INT_MAX down to other parts
of libass.
|
| |
|
| |
|
|
|
|
|
|
| |
Adds yasm version check and handles Free/OpenBSD/win32 correctly.
Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
These were missing in several places. Fixes #50.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Make sure to correctly handle situations where glyphs
have info->linebreak and info->skip set at the same time.
Fixes libass#44.
|
|
|
|
| |
This isn't part of a style. Fixes libass#45, GC#116.
|
|
|
|
| |
Fixes libass#8.
|
|
|
|
| |
Fixes libass#16 (the remaining sub-issue).
|
|
|
|
| |
...instead of doing this manually.
|
|
|
|
|
| |
Rotation origin was not taken into account
when caching glyph run bitmaps.
|
|\
| |
| | |
Shaper and hash function optimizations
|