[vlc-devel] [PATCH 3/3] demux: adaptive: avoid send blocks with invalid DTS out of order
Francois Cartegnie
fcvlcdev at free.fr
Thu Aug 31 11:50:14 CEST 2017
Le 31/08/2017 à 08:50, Zhao Zhili a écrit :
>
> ---
> 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;
> + }
I don't see what you're trying to solve here,
but everything before PCR should be output if there's no timestamp.
The bug is not in that code, but on the one sending timestamps, if any.
--
Francois Cartegnie
VideoLAN - VLC Developer
More information about the vlc-devel
mailing list