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
7a704aea
Commit
7a704aea
authored
Sep 14, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fix memleaks
parent
e241eb21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
modules/demux/subtitle.c
modules/demux/subtitle.c
+4
-4
No files found.
modules/demux/subtitle.c
View file @
7a704aea
...
...
@@ -633,7 +633,7 @@ static int TextLoad( text_t *txt, stream_t *s )
if
(
txt
->
i_line_count
>=
i_line_max
)
{
i_line_max
+=
100
;
txt
->
line
=
realloc
(
txt
->
line
,
i_line_max
*
sizeof
(
char
*
)
);
txt
->
line
=
realloc
(
txt
->
line
,
i_line_max
*
sizeof
(
char
*
)
);
}
}
...
...
@@ -996,12 +996,12 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle )
if
(
p_sys
->
psz_header
!=
NULL
)
{
if
(
!
(
p_sys
->
psz_header
=
realloc
(
p_sys
->
psz_header
,
strlen
(
p_sys
->
psz_header
)
+
strlen
(
s
)
+
2
)
)
)
strlen
(
p_sys
->
psz_header
)
+
1
+
strlen
(
s
)
+
2
)
)
)
{
msg_Err
(
p_demux
,
"out of memory"
);
return
VLC_ENOMEM
;
}
p_sys
->
psz_header
=
strcat
(
p_sys
->
psz_header
,
strdup
(
s
)
);
p_sys
->
psz_header
=
strcat
(
p_sys
->
psz_header
,
s
);
p_sys
->
psz_header
=
strcat
(
p_sys
->
psz_header
,
"
\n
"
);
}
else
...
...
@@ -1011,7 +1011,7 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle )
msg_Err
(
p_demux
,
"out of memory"
);
return
VLC_ENOMEM
;
}
p_sys
->
psz_header
=
s
trdup
(
s
)
;
p_sys
->
psz_header
=
s
;
p_sys
->
psz_header
=
strcat
(
p_sys
->
psz_header
,
"
\n
"
);
}
}
...
...
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