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
2b58ea44
Commit
2b58ea44
authored
Aug 21, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_Demux: destroy the demux from the thread
This is simpler and more consistent.
parent
a838292c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
src/input/stream_demux.c
src/input/stream_demux.c
+5
-9
No files found.
src/input/stream_demux.c
View file @
2b58ea44
...
...
@@ -44,7 +44,6 @@ struct stream_sys_t
/* Demuxer */
char
*
psz_name
;
es_out_t
*
out
;
demux_t
*
p_demux
;
vlc_thread_t
thread
;
};
...
...
@@ -82,7 +81,6 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
p_sys
->
i_pos
=
0
;
p_sys
->
out
=
out
;
p_sys
->
p_demux
=
NULL
;
p_sys
->
p_block
=
NULL
;
p_sys
->
psz_name
=
strdup
(
psz_demux
);
...
...
@@ -122,8 +120,6 @@ static void DStreamDelete( stream_t *s )
block_FifoPut
(
p_sys
->
p_fifo
,
p_empty
);
vlc_join
(
p_sys
->
thread
,
NULL
);
if
(
p_sys
->
p_demux
)
demux_Delete
(
p_sys
->
p_demux
);
if
(
p_sys
->
p_block
)
block_Release
(
p_sys
->
p_block
);
...
...
@@ -278,16 +274,14 @@ static void* DStreamThread( void *obj )
int
canc
=
vlc_savecancel
();
/* Create the demuxer */
if
(
!
(
p_demux
=
demux_New
(
s
,
s
->
p_input
,
""
,
p_sys
->
psz_name
,
""
,
s
,
p_sys
->
out
,
false
))
)
{
p_demux
=
demux_New
(
s
,
s
->
p_input
,
""
,
p_sys
->
psz_name
,
""
,
s
,
p_sys
->
out
,
false
);
if
(
p_demux
==
NULL
)
return
NULL
;
}
/* stream_Demux cannot apply DVB filters.
* Get all programs and let the E/S output sort them out. */
demux_Control
(
p_demux
,
DEMUX_SET_GROUP
,
-
1
,
NULL
);
p_sys
->
p_demux
=
p_demux
;
/* Main loop */
while
(
vlc_object_alive
(
s
)
)
...
...
@@ -295,6 +289,8 @@ static void* DStreamThread( void *obj )
if
(
demux_Demux
(
p_demux
)
<=
0
)
break
;
}
demux_Delete
(
p_demux
);
vlc_restorecancel
(
canc
);
return
NULL
;
}
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