MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ close()

void MayaFlux::IO::VideoEncodeContext::close ( )

Release all owned resources.

Safe to call multiple times or on a context that never opened.

Definition at line 80 of file VideoEncodeContext.cpp.

81{
82 if (m_scratch_frame) {
83 av_frame_free(&m_scratch_frame);
84 m_scratch_frame = nullptr;
85 }
86 if (sws_context) {
87 sws_freeContext(sws_context);
88 sws_context = nullptr;
89 }
90 if (codec_context) {
91 avcodec_free_context(&codec_context);
92 codec_context = nullptr;
93 }
94 m_stream = nullptr;
95 m_stream_index = -1;
96 m_pts = 0;
97 m_width = 0;
98 m_height = 0;
99 m_last_error.clear();
100}
AVStream * m_stream
Weak ref into FFmpegMuxContext; not owned.
AVFrame * m_scratch_frame
Owned scratch buffer for encoder input.
SwsContext * sws_context
Owned; freed in destructor.
AVCodecContext * codec_context
Owned; freed in destructor.

References codec_context, m_height, m_last_error, m_pts, m_scratch_frame, m_stream, m_stream_index, m_width, and sws_context.

Referenced by open(), and ~VideoEncodeContext().

+ Here is the caller graph for this function: