[vlc-devel] [PATCH 3/3] demux: adaptive: avoid send blocks with invalid DTS out of order
Zhao Zhili
quinkblack at foxmail.com
Thu Aug 31 08:50:26 CEST 2017
---
modules/demux/adaptive/plumbing/CommandsQueue.cpp | 28
+++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.cpp
b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
index f2a48b6..8d82578 100644
--- a/modules/demux/adaptive/plumbing/CommandsQueue.cpp
+++ b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
@@ -306,10 +306,34 @@ mtime_t CommandsQueue::Process( es_out_t *out,
mtime_t barrier )
in.pop_front();
b_datasent = true;
- if( command->getType() == ES_OUT_PRIVATE_COMMAND_SEND &&
command->getTime() > barrier )
- commands.push_back( command );
+ if( command->getType() == ES_OUT_PRIVATE_COMMAND_SEND )
+ {
+ if( command->getTime() == VLC_TS_INVALID )
+ {
+ if( commands.empty() )
+ {
+ output.push_back( command );
+ }
+ else
+ {
+ // TODO: break out only if commands include items
with the same es id
+ commands.push_back( command );
+ break;
+ }
+ }
+ else if( command->getTime() <= barrier )
+ {
+ output.push_back( command );
+ }
+ else
+ {
+ commands.push_back( command );
+ }
+ }
else
+ {
output.push_back( command );
+ }
}
/* push remaining ones if broke above */
--
2.7.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-demux-adaptive-avoid-send-blocks-with-invalid-DTS-ou.patch
Type: text/x-patch
Size: 1813 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170831/90387c58/attachment.bin>
More information about the vlc-devel
mailing list