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
0a6a4489
Commit
0a6a4489
authored
Jun 18, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: ensure data is dropped while restarting
parent
3dc73d5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
modules/demux/adaptative/Streams.cpp
modules/demux/adaptative/Streams.cpp
+24
-8
modules/demux/adaptative/Streams.hpp
modules/demux/adaptative/Streams.hpp
+1
-0
No files found.
modules/demux/adaptative/Streams.cpp
View file @
0a6a4489
...
...
@@ -287,6 +287,7 @@ BaseStreamOutput::BaseStreamOutput(demux_t *demux, const std::string &name) :
seekable
=
true
;
restarting
=
false
;
demuxstream
=
NULL
;
b_drop
=
false
;
fakeesout
=
new
es_out_t
;
if
(
!
fakeesout
)
...
...
@@ -370,12 +371,20 @@ void BaseStreamOutput::setPosition(mtime_t nztime)
if
(
pair
->
p_queue
&&
pair
->
p_queue
->
i_dts
>
VLC_TS_0
+
nztime
)
pair
->
drop
();
}
/* disable appending until restarted */
b_drop
=
true
;
vlc_mutex_unlock
(
&
lock
);
if
(
reinitsOnSeek
())
restart
();
vlc_mutex_lock
(
&
lock
);
b_drop
=
false
;
pcr
=
VLC_TS_INVALID
;
vlc_mutex_unlock
(
&
lock
);
es_out_Control
(
realdemux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
VLC_TS_0
+
nztime
);
if
(
reinitsOnSeek
())
restart
();
}
bool
BaseStreamOutput
::
restart
()
...
...
@@ -516,14 +525,21 @@ int BaseStreamOutput::esOutSend(es_out_t *fakees, es_out_id_t *p_es, block_t *p_
{
BaseStreamOutput
*
me
=
(
BaseStreamOutput
*
)
fakees
->
p_sys
;
vlc_mutex_lock
(
&
me
->
lock
);
std
::
list
<
Demuxed
*>::
const_iterator
it
;
for
(
it
=
me
->
queues
.
begin
();
it
!=
me
->
queues
.
end
();
++
it
)
if
(
me
->
b_drop
)
{
Demuxed
*
pair
=
*
it
;
if
(
pair
->
es_id
==
p_es
)
block_ChainRelease
(
p_block
);
}
else
{
std
::
list
<
Demuxed
*>::
const_iterator
it
;
for
(
it
=
me
->
queues
.
begin
();
it
!=
me
->
queues
.
end
();
++
it
)
{
block_ChainLastAppend
(
&
pair
->
pp_queue_last
,
p_block
);
break
;
Demuxed
*
pair
=
*
it
;
if
(
pair
->
es_id
==
p_es
)
{
block_ChainLastAppend
(
&
pair
->
pp_queue_last
,
p_block
);
break
;
}
}
}
vlc_mutex_unlock
(
&
me
->
lock
);
...
...
modules/demux/adaptative/Streams.hpp
View file @
0a6a4489
...
...
@@ -164,6 +164,7 @@ namespace adaptative
es_format_t
fmtcpy
;
};
std
::
list
<
Demuxed
*>
queues
;
bool
b_drop
;
vlc_mutex_t
lock
;
void
sendToDecoderUnlocked
(
mtime_t
);
bool
restart
();
...
...
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