MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / Close

Method Close

src/FrameMapper.cpp:738–766  ·  view source on GitHub ↗

Close the internal reader

Source from the content-addressed store, hash-verified

736
737// Close the internal reader
738void FrameMapper::Close()
739{
740 if (reader)
741 {
742 // Create a scoped lock, allowing only a single thread to run the following code at one time
743 const std::lock_guard<std::recursive_mutex> lock(getFrameMutex);
744
745 ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::Close");
746
747 // Close internal reader
748 reader->Close();
749 }
750
751 // Clear the fields & frames lists
752 Clear();
753
754 // Mark as dirty
755 is_dirty = true;
756
757 // Clear cache
758 final_cache.Clear();
759
760 // Deallocate resample buffer
761 if (avr) {
762 SWR_CLOSE(avr);
763 SWR_FREE(&avr);
764 avr = NULL;
765 }
766}
767
768
769// Generate JSON string of this object

Callers

nothing calls this directly

Calls 2

AppendDebugMethodMethod · 0.80
ClearMethod · 0.45

Tested by

no test coverage detected