Patch for fribidi version 1.0

el8
leigh123linux 7 years ago
parent 619bcc4695
commit 80ff953291

@ -0,0 +1,69 @@
X-Git-Url: https://git.videolan.org/?p=vlc.git;a=blobdiff_plain;f=modules%2Ftext_renderer%2Ffreetype%2Ftext_layout.c;h=1a28786d097959e246b85913eef82f78013d4108;hp=13efd567b46a30bb159c974a4c12e603275cb1c8;hb=26e2d3906658c30f2f88f4b1bc9630ec43bf5525;hpb=f391a2a3b0410a4361ca0b93209b6e5ec79ff918
diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c
index 13efd567b4..1a28786d09 100644
--- a/modules/text_renderer/freetype/text_layout.c
+++ b/modules/text_renderer/freetype/text_layout.c
@@ -153,6 +153,9 @@ typedef struct paragraph_t
#ifdef HAVE_FRIBIDI
FriBidiCharType *p_types;
+#if FRIBIDI_MAJOR_VERSION >= 1
+ FriBidiBracketType *p_btypes;
+#endif
FriBidiLevel *p_levels;
FriBidiStrIndex *pi_reordered_indices;
FriBidiParType paragraph_type;
@@ -361,6 +364,9 @@ static paragraph_t *NewParagraph( filter_t *p_filter,
#ifdef HAVE_FRIBIDI
p_paragraph->p_levels = vlc_alloc( i_size, sizeof( *p_paragraph->p_levels ) );
p_paragraph->p_types = vlc_alloc( i_size, sizeof( *p_paragraph->p_types ) );
+#if FRIBIDI_MAJOR_VERSION >= 1
+ p_paragraph->p_btypes = vlc_alloc( i_size, sizeof( *p_paragraph->p_btypes ) );
+#endif
p_paragraph->pi_reordered_indices =
vlc_alloc( i_size, sizeof( *p_paragraph->pi_reordered_indices ) );
@@ -398,6 +404,9 @@ error:
#ifdef HAVE_FRIBIDI
if( p_paragraph->p_levels ) free( p_paragraph->p_levels );
if( p_paragraph->p_types ) free( p_paragraph->p_types );
+#if FRIBIDI_MAJOR_VERSION >= 1
+ if( p_paragraph->p_btypes ) free( p_paragraph->p_btypes );
+#endif
if( p_paragraph->pi_reordered_indices )
free( p_paragraph->pi_reordered_indices );
#endif
@@ -424,6 +433,9 @@ static void FreeParagraph( paragraph_t *p_paragraph )
#ifdef HAVE_FRIBIDI
free( p_paragraph->pi_reordered_indices );
free( p_paragraph->p_types );
+#if FRIBIDI_MAJOR_VERSION >= 1
+ free( p_paragraph->p_btypes );
+#endif
free( p_paragraph->p_levels );
#endif
@@ -436,10 +448,22 @@ static int AnalyzeParagraph( paragraph_t *p_paragraph )
fribidi_get_bidi_types( p_paragraph->p_code_points,
p_paragraph->i_size,
p_paragraph->p_types );
+#if FRIBIDI_MAJOR_VERSION >= 1
+ fribidi_get_bracket_types( p_paragraph->p_code_points,
+ p_paragraph->i_size,
+ p_paragraph->p_types,
+ p_paragraph->p_btypes );
+ fribidi_get_par_embedding_levels_ex( p_paragraph->p_types,
+ p_paragraph->p_btypes,
+ p_paragraph->i_size,
+ &p_paragraph->paragraph_type,
+ p_paragraph->p_levels );
+#else
fribidi_get_par_embedding_levels( p_paragraph->p_types,
p_paragraph->i_size,
&p_paragraph->paragraph_type,
p_paragraph->p_levels );
+#endif
#ifdef HAVE_HARFBUZZ
hb_unicode_funcs_t *p_funcs = hb_unicode_funcs_get_default();

@ -50,6 +50,8 @@ URL: http://www.videolan.org
Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz
# Missing file from tarball # Missing file from tarball
Source1: asm.S Source1: asm.S
# https://git.videolan.org/?p=vlc.git;a=commit;h=26e2d3906658c30f2f88f4b1bc9630ec43bf5525
Patch0: modules_text_renderer_freetype_text_layout.c.patch
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
@ -267,6 +269,7 @@ VLC media player extras modules.
%prep %prep
%setup -q -n %{name}-%{vlc_vers}%{?vlc_rc:-%{vlc_rc}} %setup -q -n %{name}-%{vlc_vers}%{?vlc_rc:-%{vlc_rc}}
%patch0 -p1
%{?_with_bootstrap: %{?_with_bootstrap:
rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :
./bootstrap ./bootstrap
@ -554,6 +557,7 @@ fi || :
%changelog %changelog
* Thu Mar 08 2018 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 3.0.1-3 * Thu Mar 08 2018 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 3.0.1-3
- Rebuilt for new ffmpeg snapshot - Rebuilt for new ffmpeg snapshot
- Patch for fribidi version 1.0
* Wed Feb 28 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-2 * Wed Feb 28 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-2
- Rebuilt for x265 - Rebuilt for x265

Loading…
Cancel
Save