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

◆ close()

void MayaFlux::IO::AudioStreamContext::close ( )

Release codec and resampler resources.

Safe to call multiple times.

Definition at line 23 of file AudioStreamContext.cpp.

24{
25 if (swr_context) {
26 swr_free(&swr_context);
27 swr_context = nullptr;
28 }
29 if (codec_context) {
30 avcodec_free_context(&codec_context);
31 codec_context = nullptr;
32 }
33 stream_index = -1;
34 total_frames = 0;
35 sample_rate = 0;
36 channels = 0;
37 m_last_error.clear();
38}
SwrContext * swr_context
Owned; freed in destructor.
AVCodecContext * codec_context
Owned; freed in destructor.

References channels, codec_context, m_last_error, sample_rate, stream_index, swr_context, and total_frames.

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

+ Here is the caller graph for this function: