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
2a8983fe
Commit
2a8983fe
authored
Aug 06, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SSA: do not use memmove
Ref #7210
parent
0e519f71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
modules/demux/subtitle.c
modules/demux/subtitle.c
+9
-4
No files found.
modules/demux/subtitle.c
View file @
2a8983fe
...
...
@@ -1009,7 +1009,7 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle,
{
const
char
*
s
=
TextGetLine
(
txt
);
int
h1
,
m1
,
s1
,
c1
,
h2
,
m2
,
s2
,
c2
;
char
*
psz_text
;
char
*
psz_text
,
*
psz_temp
;
char
temp
[
16
];
if
(
!
s
)
...
...
@@ -1052,9 +1052,14 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle,
int
i_layer
=
(
p_sys
->
i_type
==
SUB_TYPE_ASS
)
?
atoi
(
temp
)
:
0
;
/* ReadOrder, Layer, %s(rest of fields) */
snprintf
(
temp
,
sizeof
(
temp
),
"%d,%d,"
,
i_idx
,
i_layer
);
memmove
(
psz_text
+
strlen
(
temp
),
psz_text
,
strlen
(
psz_text
)
+
1
);
memcpy
(
psz_text
,
temp
,
strlen
(
temp
)
);
if
(
asprintf
(
&
psz_temp
,
"%d,%d,%s"
,
i_idx
,
i_layer
,
psz_text
)
==
-
1
)
{
free
(
psz_text
);
return
VLC_ENOMEM
;
}
free
(
psz_text
);
psz_text
=
psz_temp
;
}
p_subtitle
->
i_start
=
(
(
int64_t
)
h1
*
3600
*
1000
+
...
...
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