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
d7fc7b2d
Commit
d7fc7b2d
authored
Oct 11, 2008
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ty demux: simplify and fix potential memleak (CID 214)
parent
6f3129f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
modules/demux/ty.c
modules/demux/ty.c
+8
-15
No files found.
modules/demux/ty.c
View file @
d7fc7b2d
...
@@ -789,25 +789,18 @@ static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
...
@@ -789,25 +789,18 @@ static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
/* Send the CC data */
/* Send the CC data */
if
(
p_block_in
->
i_pts
>
0
&&
p_sys
->
cc
.
i_data
>
0
)
if
(
p_block_in
->
i_pts
>
0
&&
p_sys
->
cc
.
i_data
>
0
)
{
{
int
i_cc_count
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
p_sys
->
p_cc
[
i
]
)
{
block_t
*
p_cc
=
block_New
(
p_demux
,
p_sys
->
cc
.
i_data
);
block_t
*
p_cc
=
block_New
(
p_demux
,
p_sys
->
cc
.
i_data
);
p_cc
->
i_flags
|=
BLOCK_FLAG_TYPE_I
;
p_cc
->
i_flags
|=
BLOCK_FLAG_TYPE_I
;
p_cc
->
i_pts
=
p_block_in
->
i_pts
;
p_cc
->
i_pts
=
p_block_in
->
i_pts
;
memcpy
(
p_cc
->
p_buffer
,
p_sys
->
cc
.
p_data
,
p_sys
->
cc
.
i_data
);
memcpy
(
p_cc
->
p_buffer
,
p_sys
->
cc
.
p_data
,
p_sys
->
cc
.
i_data
);
for
(
i
=
0
,
i_cc_count
=
0
;
i
<
4
;
i
++
)
i_cc_count
+=
p_sys
->
p_cc
[
i
]
?
1
:
0
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
!
p_sys
->
p_cc
[
i
]
)
continue
;
if
(
i_cc_count
>
1
)
es_out_Send
(
p_demux
->
out
,
p_sys
->
p_cc
[
i
],
block_Duplicate
(
p_cc
)
);
else
es_out_Send
(
p_demux
->
out
,
p_sys
->
p_cc
[
i
],
p_cc
);
es_out_Send
(
p_demux
->
out
,
p_sys
->
p_cc
[
i
],
p_cc
);
}
}
}
cc_Flush
(
&
p_sys
->
cc
);
cc_Flush
(
&
p_sys
->
cc
);
}
}
...
...
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