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
626062e6
Commit
626062e6
authored
Apr 27, 2014
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartztext: remove write-only variables and a potential error-case leak
parent
b8b8c438
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
modules/text_renderer/quartztext.c
modules/text_renderer/quartztext.c
+6
-13
No files found.
modules/text_renderer/quartztext.c
View file @
626062e6
...
...
@@ -310,7 +310,7 @@ static int RenderText(filter_t *p_filter, subpicture_region_t *p_region_out,
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
char
*
psz_string
;
int
i_font_
alpha
,
i_font_
size
;
int
i_font_size
;
uint32_t
i_font_color
;
bool
b_bold
,
b_uline
,
b_italic
;
vlc_value_t
val
;
...
...
@@ -329,7 +329,6 @@ static int RenderText(filter_t *p_filter, subpicture_region_t *p_region_out,
if
(
p_region_in
->
p_style
)
{
i_font_color
=
VLC_CLIP
(
p_region_in
->
p_style
->
i_font_color
,
0
,
0xFFFFFF
);
i_font_alpha
=
VLC_CLIP
(
p_region_in
->
p_style
->
i_font_alpha
,
0
,
255
);
i_font_size
=
VLC_CLIP
(
p_region_in
->
p_style
->
i_font_size
,
0
,
255
);
if
(
p_region_in
->
p_style
->
i_style_flags
)
{
if
(
p_region_in
->
p_style
->
i_style_flags
&
STYLE_BOLD
)
...
...
@@ -341,13 +340,9 @@ static int RenderText(filter_t *p_filter, subpicture_region_t *p_region_out,
}
}
else
{
i_font_color
=
p_sys
->
i_font_color
;
i_font_alpha
=
255
-
p_sys
->
i_font_opacity
;
i_font_size
=
p_sys
->
i_font_size
;
}
if
(
!
i_font_alpha
)
i_font_alpha
=
255
-
p_sys
->
i_font_opacity
;
if
(
i_font_size
<=
0
)
{
msg_Warn
(
p_filter
,
"invalid fontsize, using 12"
);
if
(
VLC_SUCCESS
==
var_Get
(
p_filter
,
"scale"
,
&
val
))
...
...
@@ -779,8 +774,6 @@ static int RenderHtml(filter_t *p_filter, subpicture_region_t *p_region_out,
if
(
p_sub
)
{
p_xml
=
xml_Create
(
p_filter
);
if
(
p_xml
)
{
bool
b_karaoke
=
false
;
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_sub
);
if
(
p_xml_reader
)
{
/* Look for Root Node */
...
...
@@ -792,10 +785,7 @@ static int RenderHtml(filter_t *p_filter, subpicture_region_t *p_region_out,
* of times to show the progress marker on the text.
*/
var_SetBool
(
p_filter
,
"text-rerender"
,
true
);
b_karaoke
=
true
;
}
else
if
(
!
strcasecmp
(
"text"
,
name
))
b_karaoke
=
false
;
else
{
}
else
{
/* Only text and karaoke tags are supported */
msg_Dbg
(
p_filter
,
"Unsupported top-level tag "
"<%s> ignored."
,
name
);
...
...
@@ -1010,8 +1000,11 @@ static int RenderYUVA(filter_t *p_filter, subpicture_region_t *p_region,
fmt
.
i_sar_den
=
1
;
p_region
->
p_picture
=
picture_NewFromFormat
(
&
fmt
);
if
(
!
p_region
->
p_picture
)
if
(
!
p_region
->
p_picture
)
{
free
(
p_offScreen
->
p_data
);
free
(
p_offScreen
);
return
VLC_EGENERIC
;
}
p_region
->
fmt
=
fmt
;
p_dst_y
=
p_region
->
p_picture
->
Y_PIXELS
;
...
...
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