Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
025c0e4a
Commit
025c0e4a
authored
Sep 20, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify subpicture region allocation in fbosd.
parent
f0c76d50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
modules/gui/fbosd.c
modules/gui/fbosd.c
+15
-20
No files found.
modules/gui/fbosd.c
View file @
025c0e4a
...
@@ -846,27 +846,27 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
...
@@ -846,27 +846,27 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
if
(
p_sys
->
p_text
&&
p_sys
->
p_text
->
p_module
)
if
(
p_sys
->
p_text
&&
p_sys
->
p_text
->
p_module
)
{
{
p_region
=
(
subpicture_region_t
*
)
malloc
(
sizeof
(
subpicture_region_t
)
);
video_format_t
fmt
;
memset
(
&
fmt
,
0
,
sizeof
(
fmt
)
);
fmt
.
i_chroma
=
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
);
fmt
.
i_aspect
=
0
;
fmt
.
i_width
=
fmt
.
i_visible_width
=
0
;
fmt
.
i_height
=
fmt
.
i_visible_height
=
0
;
fmt
.
i_x_offset
=
0
;
fmt
.
i_y_offset
=
0
;
p_region
=
subpicture_region_New
(
&
fmt
);
if
(
!
p_region
)
if
(
!
p_region
)
return
p_dest
;
return
p_dest
;
memset
(
p_region
,
0
,
sizeof
(
subpicture_region_t
)
);
p_region
->
psz_text
=
strdup
(
psz_string
);
p_region
->
psz_text
=
strdup
(
psz_string
);
if
(
!
p_region
->
psz_text
)
if
(
!
p_region
->
psz_text
)
{
{
fre
e
(
p_region
);
subpicture_region_Delet
e
(
p_region
);
return
NULL
;
return
NULL
;
}
}
p_region
->
p_style
=
p_style
;
p_region
->
p_style
=
p_style
;
p_region
->
fmt
.
i_chroma
=
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
);
p_region
->
fmt
.
i_aspect
=
0
;
p_region
->
fmt
.
i_width
=
p_region
->
fmt
.
i_visible_width
=
0
;
p_region
->
fmt
.
i_height
=
p_region
->
fmt
.
i_visible_height
=
0
;
p_region
->
fmt
.
i_x_offset
=
0
;
p_region
->
fmt
.
i_y_offset
=
0
;
p_region
->
i_align
=
OSD_ALIGN_LEFT
|
OSD_ALIGN_TOP
;
p_region
->
i_align
=
OSD_ALIGN_LEFT
|
OSD_ALIGN_TOP
;
if
(
p_sys
->
p_text
->
pf_render_text
)
if
(
p_sys
->
p_text
->
pf_render_text
)
...
@@ -887,9 +887,7 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
...
@@ -887,9 +887,7 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
p_dest
=
AllocatePicture
(
VLC_OBJECT
(
p_intf
),
&
fmt_out
);
p_dest
=
AllocatePicture
(
VLC_OBJECT
(
p_intf
),
&
fmt_out
);
if
(
!
p_dest
)
if
(
!
p_dest
)
{
{
picture_Release
(
p_region
->
p_picture
);
subpicture_region_Delete
(
p_region
);
free
(
p_region
->
psz_text
);
free
(
p_region
);
return
NULL
;
return
NULL
;
}
}
picture_Copy
(
p_dest
,
p_region
->
p_picture
);
picture_Copy
(
p_dest
,
p_region
->
p_picture
);
...
@@ -898,13 +896,10 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
...
@@ -898,13 +896,10 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
p_dest
=
ConvertImage
(
p_intf
,
&
p_region
->
p_picture
,
p_dest
=
ConvertImage
(
p_intf
,
&
p_region
->
p_picture
,
&
p_region
->
fmt
,
&
fmt_out
);
&
p_region
->
fmt
,
&
fmt_out
);
#endif
#endif
picture_Release
(
p_region
->
p_picture
);
subpicture_region_Delete
(
p_region
);
free
(
p_region
->
psz_text
);
free
(
p_region
);
return
p_dest
;
return
p_dest
;
}
}
free
(
p_region
->
psz_text
);
subpicture_region_Delete
(
p_region
);
free
(
p_region
);
}
}
return
p_dest
;
return
p_dest
;
}
}
...
...
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