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
Show 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) :
...
@@ -287,6 +287,7 @@ BaseStreamOutput::BaseStreamOutput(demux_t *demux, const std::string &name) :
seekable
=
true
;
seekable
=
true
;
restarting
=
false
;
restarting
=
false
;
demuxstream
=
NULL
;
demuxstream
=
NULL
;
b_drop
=
false
;
fakeesout
=
new
es_out_t
;
fakeesout
=
new
es_out_t
;
if
(
!
fakeesout
)
if
(
!
fakeesout
)
...
@@ -370,12 +371,20 @@ void BaseStreamOutput::setPosition(mtime_t nztime)
...
@@ -370,12 +371,20 @@ void BaseStreamOutput::setPosition(mtime_t nztime)
if
(
pair
->
p_queue
&&
pair
->
p_queue
->
i_dts
>
VLC_TS_0
+
nztime
)
if
(
pair
->
p_queue
&&
pair
->
p_queue
->
i_dts
>
VLC_TS_0
+
nztime
)
pair
->
drop
();
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
;
pcr
=
VLC_TS_INVALID
;
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_unlock
(
&
lock
);
es_out_Control
(
realdemux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
es_out_Control
(
realdemux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
VLC_TS_0
+
nztime
);
VLC_TS_0
+
nztime
);
if
(
reinitsOnSeek
())
restart
();
}
}
bool
BaseStreamOutput
::
restart
()
bool
BaseStreamOutput
::
restart
()
...
@@ -516,6 +525,12 @@ int BaseStreamOutput::esOutSend(es_out_t *fakees, es_out_id_t *p_es, block_t *p_
...
@@ -516,6 +525,12 @@ int BaseStreamOutput::esOutSend(es_out_t *fakees, es_out_id_t *p_es, block_t *p_
{
{
BaseStreamOutput
*
me
=
(
BaseStreamOutput
*
)
fakees
->
p_sys
;
BaseStreamOutput
*
me
=
(
BaseStreamOutput
*
)
fakees
->
p_sys
;
vlc_mutex_lock
(
&
me
->
lock
);
vlc_mutex_lock
(
&
me
->
lock
);
if
(
me
->
b_drop
)
{
block_ChainRelease
(
p_block
);
}
else
{
std
::
list
<
Demuxed
*>::
const_iterator
it
;
std
::
list
<
Demuxed
*>::
const_iterator
it
;
for
(
it
=
me
->
queues
.
begin
();
it
!=
me
->
queues
.
end
();
++
it
)
for
(
it
=
me
->
queues
.
begin
();
it
!=
me
->
queues
.
end
();
++
it
)
{
{
...
@@ -526,6 +541,7 @@ int BaseStreamOutput::esOutSend(es_out_t *fakees, es_out_id_t *p_es, block_t *p_
...
@@ -526,6 +541,7 @@ int BaseStreamOutput::esOutSend(es_out_t *fakees, es_out_id_t *p_es, block_t *p_
break
;
break
;
}
}
}
}
}
vlc_mutex_unlock
(
&
me
->
lock
);
vlc_mutex_unlock
(
&
me
->
lock
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
modules/demux/adaptative/Streams.hpp
View file @
0a6a4489
...
@@ -164,6 +164,7 @@ namespace adaptative
...
@@ -164,6 +164,7 @@ namespace adaptative
es_format_t
fmtcpy
;
es_format_t
fmtcpy
;
};
};
std
::
list
<
Demuxed
*>
queues
;
std
::
list
<
Demuxed
*>
queues
;
bool
b_drop
;
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
void
sendToDecoderUnlocked
(
mtime_t
);
void
sendToDecoderUnlocked
(
mtime_t
);
bool
restart
();
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