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
c1d3fe80
Commit
c1d3fe80
authored
Jul 08, 2015
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Jul 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add text_segment_Delete to delete a specific segment
parent
ef4a8698
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
include/vlc_text_style.h
include/vlc_text_style.h
+8
-1
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/misc/text_style.c
src/misc/text_style.c
+11
-3
No files found.
include/vlc_text_style.h
View file @
c1d3fe80
...
@@ -133,12 +133,19 @@ VLC_API void text_style_Delete( text_style_t * );
...
@@ -133,12 +133,19 @@ VLC_API void text_style_Delete( text_style_t * );
* This function will create a new text segment.
* This function will create a new text segment.
*
*
* You should use text_segment_ChainDelete to destroy it, to clean all
* You should use text_segment_ChainDelete to destroy it, to clean all
* the linked segments
.
* the linked segments
, or text_segment_Delete to free a specic one
*
*
* This duplicates the string passed as argument
* This duplicates the string passed as argument
*/
*/
VLC_API
text_segment_t
*
text_segment_New
(
const
char
*
);
VLC_API
text_segment_t
*
text_segment_New
(
const
char
*
);
/**
* Delete a text segment and its content.
*
* This assumes the segment is not part of a chain
*/
VLC_API
void
text_segment_Delete
(
text_segment_t
*
);
/**
/**
* This function will destroy a list of text segments allocated
* This function will destroy a list of text segments allocated
* by text_segment_New.
* by text_segment_New.
...
...
src/libvlccore.sym
View file @
c1d3fe80
...
@@ -419,6 +419,7 @@ subpicture_region_Copy
...
@@ -419,6 +419,7 @@ subpicture_region_Copy
subpicture_region_Delete
subpicture_region_Delete
subpicture_region_New
subpicture_region_New
text_segment_New
text_segment_New
text_segment_Delete
text_segment_ChainDelete
text_segment_ChainDelete
text_segment_Copy
text_segment_Copy
vlc_tls_ClientCreate
vlc_tls_ClientCreate
...
...
src/misc/text_style.c
View file @
c1d3fe80
...
@@ -105,15 +105,23 @@ text_segment_t *text_segment_New( const char *psz_text )
...
@@ -105,15 +105,23 @@ text_segment_t *text_segment_New( const char *psz_text )
return
segment
;
return
segment
;
}
}
void
text_segment_Delete
(
text_segment_t
*
segment
)
{
if
(
segment
!=
NULL
)
{
free
(
segment
->
psz_text
);
free
(
segment
);
text_style_Delete
(
segment
->
style
);
}
}
void
text_segment_ChainDelete
(
text_segment_t
*
segment
)
void
text_segment_ChainDelete
(
text_segment_t
*
segment
)
{
{
while
(
segment
!=
NULL
)
while
(
segment
!=
NULL
)
{
{
text_segment_t
*
p_next
=
segment
->
p_next
;
text_segment_t
*
p_next
=
segment
->
p_next
;
free
(
segment
->
psz_text
);
text_segment_Delete
(
segment
);
//text_style_Delete( segment->style );
free
(
segment
);
segment
=
p_next
;
segment
=
p_next
;
}
}
...
...
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