/// <inheritdoc/> protected override void OnDisposing() { FlushEncoder(); packet.Dispose(); var ptr = CodecPointer; ffmpeg.avcodec_close(ptr); }
/// <summary> /// Discards all packet data buffered by this instance. /// </summary> public void DiscardBufferedData() { foreach (var packet in BufferedPackets) { packet.Wipe(); packet.Dispose(); } BufferedPackets.Clear(); }