[vlc-devel] [PATCH] demux: adaptive: workaround successive setPosition failed by flush EsOutAddCommand

Francois Cartegnie fcvlcdev at free.fr
Tue Oct 17 19:08:31 CEST 2017


Le 07/10/2017 à 08:03, Zhao Zhili a écrit :
> ---
>  modules/demux/adaptive/Streams.cpp                |  8 ++++++
>  modules/demux/adaptive/plumbing/CommandsQueue.cpp | 33 +++++++++++++++++++++++
>  modules/demux/adaptive/plumbing/CommandsQueue.hpp |  1 +
>  3 files changed, 42 insertions(+)
> 
> diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
> index 96543d3187..d1e97df358 100644
> --- a/modules/demux/adaptive/Streams.cpp
> +++ b/modules/demux/adaptive/Streams.cpp
> @@ -498,7 +498,15 @@ bool AbstractStream::setPosition(mtime_t time, bool tryonly)
>              setTimeOffset(segmentTracker->getPlaybackTime());
>  
>              if( !restartDemux() )
> +            {
>                  dead = true;
> +            }
> +            else
> +            {
> +                /* To avoid a successive setPosition failed because fakeesout is restarting, we
> +                 * flush EsOutAddCommand here. */
> +                commandsqueue->flushAddCommand(p_realdemux->out);
> +            }
>          }
>          else commandsqueue->Abort( true );

I don't understand the issue.

Since modifying commands queue is pretty risky and can easily break
something and debugging then would take multiple hours,
that needs a detailed explanation and test case.

-- 
Francois Cartegnie
VideoLAN - VLC Developer


More information about the vlc-devel mailing list