public void Reset() { cancellationTokenSource?.Cancel(); thread?.Factory?.Run(DeallocFFmpeg); thread?.Join(); thread = null; buffer = null; }
public Task <ClipConfiguration> InitForEs() { if (IsInitialized()) { throw new InvalidOperationException("Initialization already started"); } InitThreadingPrimitives(); buffer = new ChunksBuffer(); return(thread.Factory.StartNew(() => InitDemuxer(InitEs))); }