Beispiel #1
0
        /// <inheritdoc/>
        protected override void OnDisposing()
        {
            FlushEncoder();
            packet.Dispose();

            var ptr = CodecPointer;

            ffmpeg.avcodec_close(ptr);
        }
Beispiel #2
0
        /// <summary>
        /// Discards all packet data buffered by this instance.
        /// </summary>
        public void DiscardBufferedData()
        {
            foreach (var packet in BufferedPackets)
            {
                packet.Wipe();
                packet.Dispose();
            }

            BufferedPackets.Clear();
        }