Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
99565f4f
Commit
99565f4f
authored
Feb 29, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small cleanup
parent
773c5eff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
modules/misc/freetype.c
modules/misc/freetype.c
+13
-7
No files found.
modules/misc/freetype.c
View file @
99565f4f
...
@@ -1134,7 +1134,8 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -1134,7 +1134,8 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
i_out_bytes
=
i_in_bytes
*
sizeof
(
uint32_t
);
i_out_bytes
=
i_in_bytes
*
sizeof
(
uint32_t
);
i_out_bytes_left
=
i_out_bytes
;
i_out_bytes_left
=
i_out_bytes
;
p_out_buffer
=
(
char
*
)
psz_unicode
;
p_out_buffer
=
(
char
*
)
psz_unicode
;
i_ret
=
vlc_iconv
(
iconv_handle
,
(
const
char
**
)
&
p_in_buffer
,
&
i_in_bytes
,
i_ret
=
vlc_iconv
(
iconv_handle
,
(
const
char
**
)
&
p_in_buffer
,
&
i_in_bytes
,
&
p_out_buffer
,
&
i_out_bytes_left
);
&
p_out_buffer
,
&
i_out_bytes_left
);
vlc_iconv_close
(
iconv_handle
);
vlc_iconv_close
(
iconv_handle
);
...
@@ -1152,7 +1153,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -1152,7 +1153,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
#if defined(HAVE_FRIBIDI)
#if defined(HAVE_FRIBIDI)
{
{
uint32_t
*
p_fribidi_string
;
uint32_t
*
p_fribidi_string
;
int
start_pos
,
pos
=
0
;
int
32_t
start_pos
,
pos
=
0
;
p_fribidi_string
=
malloc
(
(
i_string_length
+
1
)
*
sizeof
(
uint32_t
)
);
p_fribidi_string
=
malloc
(
(
i_string_length
+
1
)
*
sizeof
(
uint32_t
)
);
if
(
!
p_fribidi_string
)
if
(
!
p_fribidi_string
)
...
@@ -1162,9 +1163,10 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -1162,9 +1163,10 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
}
}
/* Do bidi conversion line-by-line */
/* Do bidi conversion line-by-line */
while
(
pos
<
i_string_length
)
while
(
pos
<
i_string_length
)
{
{
while
(
pos
<
i_string_length
)
{
while
(
pos
<
i_string_length
)
{
i_char
=
psz_unicode
[
pos
];
i_char
=
psz_unicode
[
pos
];
if
(
i_char
!=
'\r'
&&
i_char
!=
'\n'
)
if
(
i_char
!=
'\r'
&&
i_char
!=
'\n'
)
break
;
break
;
...
@@ -1172,7 +1174,8 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -1172,7 +1174,8 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
++
pos
;
++
pos
;
}
}
start_pos
=
pos
;
start_pos
=
pos
;
while
(
pos
<
i_string_length
)
{
while
(
pos
<
i_string_length
)
{
i_char
=
psz_unicode
[
pos
];
i_char
=
psz_unicode
[
pos
];
if
(
i_char
==
'\r'
||
i_char
==
'\n'
)
if
(
i_char
==
'\r'
||
i_char
==
'\n'
)
break
;
break
;
...
@@ -1181,8 +1184,11 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -1181,8 +1184,11 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
if
(
pos
>
start_pos
)
if
(
pos
>
start_pos
)
{
{
FriBidiCharType
base_dir
=
FRIBIDI_TYPE_LTR
;
FriBidiCharType
base_dir
=
FRIBIDI_TYPE_LTR
;
fribidi_log2vis
((
FriBidiChar
*
)
psz_unicode
+
start_pos
,
pos
-
start_pos
,
fribidi_log2vis
((
FriBidiChar
*
)
psz_unicode
+
start_pos
,
&
base_dir
,
(
FriBidiChar
*
)
p_fribidi_string
+
start_pos
,
0
,
0
,
0
);
pos
-
start_pos
,
&
base_dir
,
(
FriBidiChar
*
)
p_fribidi_string
+
start_pos
,
0
,
0
,
0
);
}
}
}
}
...
...
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