Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
4c3ae096
Commit
4c3ae096
authored
Aug 05, 2008
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libass contrib: apply the latest fixes that have been applied in mplayer on vanilla libass
parent
268c8216
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
142 additions
and
0 deletions
+142
-0
extras/contrib/src/Makefile
extras/contrib/src/Makefile
+1
-0
extras/contrib/src/Patches/libass_mplayer_updates.patch
extras/contrib/src/Patches/libass_mplayer_updates.patch
+141
-0
No files found.
extras/contrib/src/Makefile
View file @
4c3ae096
...
@@ -2444,6 +2444,7 @@ libass-$(ASS_VERSION).tar.bz2:
...
@@ -2444,6 +2444,7 @@ libass-$(ASS_VERSION).tar.bz2:
libass
:
libass-$(ASS_VERSION).tar.bz2
libass
:
libass-$(ASS_VERSION).tar.bz2
$(EXTRACT_BZ2)
$(EXTRACT_BZ2)
patch
-p0
< Patches/libass_mplayer_updates.patch
ifneq
($(HOST),$(BUILD))
ifneq
($(HOST),$(BUILD))
patch
-p0
< Patches/libass-cross.patch
patch
-p0
< Patches/libass-cross.patch
cd
$@
;
autoconf
cd
$@
;
autoconf
...
...
extras/contrib/src/Patches/libass_mplayer_updates.patch
0 → 100644
View file @
4c3ae096
diff -ruN libass/libass/ass.c libass.update/libass/ass.c
--- libass/libass/ass.c 2008-05-22 20:01:18.000000000 +0200
+++ libass.update/libass/ass.c 2008-08-04 04:10:14.000000000 +0200
@@ -846,16 +846,22 @@
char* ip;
char* op;
size_t rc;
+ int clear = 0;
- outbuf = malloc(size);
+ outbuf = malloc(osize);
ip = data;
op = outbuf;
- while (ileft) {
+ while (1) {
+ if(ileft)
rc = iconv(icdsc, &ip, &ileft, &op, &oleft);
+ else {// clear the conversion state and leave
+ clear = 1;
+ rc = iconv(icdsc, NULL, NULL, &op, &oleft);
+ }
if (rc == (size_t)(-1)) {
if (errno == E2BIG) {
- int offset = op - outbuf;
+ size_t offset = op - outbuf;
outbuf = (char*)realloc(outbuf, osize + size);
op = outbuf + offset;
osize += size;
@@ -864,7 +870,9 @@
mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorRecodingFile);
return NULL;
}
- }
+ } else
+ if( clear )
+ break;
}
outbuf[osize - oleft - 1] = 0;
}
diff -ruN libass/libass/ass_fontconfig.c libass.update/libass/ass_fontconfig.c
--- libass/libass/ass_fontconfig.c 2008-05-22 20:01:18.000000000 +0200
+++ libass.update/libass/ass_fontconfig.c 2008-08-04 04:14:45.000000000 +0200
@@ -129,6 +129,8 @@
goto error;
fset = FcFontSort(priv->config, pat, FcTrue, NULL, &result);
+ if(!fset)
+ goto error;
for (curf = 0; curf < fset->nfont; ++curf) {
FcPattern* curp = fset->fonts[curf];
@@ -351,12 +353,15 @@
FcPattern* pattern;
FcFontSet* fset;
FcBool res;
+ int face_index, num_faces = 1;
- rc = FT_New_Memory_Face(ftlibrary, (unsigned char*)data, data_size, 0, &face);
+ for (face_index = 0; face_index < num_faces; ++face_index) {
+ rc = FT_New_Memory_Face(ftlibrary, (unsigned char*)data, data_size, 0, &face);
if (rc) {
mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorOpeningMemoryFont, name);
return;
}
+ num_faces = face->num_faces;
pattern = FcFreeTypeQueryFace(face, (unsigned char*)name, 0, FcConfigGetBlanks(priv->config));
if (!pattern) {
@@ -380,6 +385,7 @@
}
FT_Done_Face(face);
+ }
#endif
}
@@ -419,7 +425,8 @@
for (i = 0; i < library->num_fontdata; ++i)
process_fontdata(priv, library, ftlibrary, i);
- if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse)
+ if(dir) {
+ if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse)
{
mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_UpdatingFontCache);
if (FcGetVersion() >= 20390 && FcGetVersion() < 20400)
@@ -457,6 +464,7 @@
if (!rc) {
mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcConfigAppFontAddDirFailed);
}
+ }
priv->family_default = family ? strdup(family) : 0;
priv->path_default = path ? strdup(path) : 0;
diff -ruN libass/libass/ass_render.c libass.update/libass/ass_render.c
--- libass/libass/ass_render.c 2008-05-22 20:01:18.000000000 +0200
+++ libass.update/libass/ass_render.c 2008-08-04 04:16:01.000000000 +0200
@@ -679,11 +679,11 @@
* \param pwr multiplier for some tag effects (comes from \t tags)
*/
static char* parse_tag(char* p, double pwr) {
-#define skip_all(x) if (*p == (x)) ++p; else { \
- while ((*p != (x)) && (*p != '}') && (*p != 0)) {++p;} }
+#define skip_to(x) while ((*p != (x)) && (*p != '}') && (*p != 0)) { ++p;}
#define skip(x) if (*p == (x)) ++p; else { return p; }
- skip_all('\\');
+ skip_to('\\');
+ skip('\\');
if ((*p == '}') || (*p == 0))
return p;
@@ -787,7 +787,7 @@
} else if (mystrcmp(&p, "fn")) {
char* start = p;
char* family;
- skip_all('\\');
+ skip_to('\\');
if (p > start) {
family = malloc(p - start + 1);
strncpy(family, start, p - start);
@@ -928,7 +928,8 @@
}
while (*p == '\\')
p = parse_tag(p, k); // maybe k*pwr ? no, specs forbid nested \t's
- skip_all(')'); // FIXME: better skip(')'), but much more tags support required
+ skip_to(')'); // in case there is some unknown tag or a comment
+ skip(')');
} else if (mystrcmp(&p, "clip")) {
int x0, y0, x1, y1;
int res = 1;
@@ -1031,7 +1032,7 @@
return p;
#undef skip
-#undef skip_all
+#undef skip_to
}
/**
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment