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

◆ ~FFmpegContext()

MayaFlux::IO::FFmpegContext::~FFmpegContext ( )

Definition at line 20 of file SoundFileReader.cpp.

21{
22 // Cleanup order matters: resampler -> codec -> format
23 if (swr_context) {
24 swr_free(&swr_context);
25 swr_context = nullptr;
26 }
27
28 if (codec_context) {
29 avcodec_free_context(&codec_context);
30 codec_context = nullptr;
31 }
32
33 if (format_context) {
34 avformat_close_input(&format_context);
35 format_context = nullptr;
36 }
37
39}

References audio_stream_index, codec_context, format_context, and swr_context.