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
ddece1c5
Commit
ddece1c5
authored
Apr 16, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decomp: fix leak on error and clean up a little
parent
5ddb4ea1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
modules/stream_filter/decomp.c
modules/stream_filter/decomp.c
+19
-9
No files found.
modules/stream_filter/decomp.c
View file @
ddece1c5
...
...
@@ -71,11 +71,17 @@ vlc_module_end ()
struct
stream_sys_t
{
block_t
*
peeked
;
uint64_t
offset
;
/* Thread data */
int
write_fd
;
/* Caller data */
vlc_thread_t
thread
;
pid_t
pid
;
int
write_fd
,
read_fd
;
uint64_t
offset
;
block_t
*
peeked
;
int
read_fd
;
bool
can_pace
;
};
...
...
@@ -277,9 +283,10 @@ static int Open (stream_t *stream, const char *path)
stream
->
pf_read
=
Read
;
stream
->
pf_peek
=
Peek
;
stream
->
pf_control
=
Control
;
p_sys
->
peeked
=
NULL
;
p_sys
->
offset
=
0
;
p_sys
->
pid
=
-
1
;
p_sys
->
offset
=
0
;
p_sys
->
peeked
=
NULL
;
stream_Control
(
stream
->
p_source
,
STREAM_CAN_CONTROL_PACE
,
&
p_sys
->
can_pace
);
...
...
@@ -344,12 +351,15 @@ static int Open (stream_t *stream, const char *path)
}
close
(
comp
[
0
]);
if
(
ret
!=
VLC_SUCCESS
)
{
close
(
comp
[
1
]);
if
(
p_sys
->
pid
!=
-
1
)
while
(
waitpid
(
p_sys
->
pid
,
&
(
int
){
0
},
0
)
==
-
1
);
}
}
if
(
ret
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
if
(
p_sys
->
pid
!=
-
1
)
while
(
waitpid
(
p_sys
->
pid
,
&
(
int
){
0
},
0
)
==
-
1
);
free
(
p_sys
);
return
ret
;
}
...
...
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