Skip to content

Commit 122328a

Browse files
authored
Merge pull request #153 from cho-m/ffmpeg-8.0
Fix build with FFmpeg 8.0
2 parents ac31acc + c0870e3 commit 122328a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/audio/ffmpeg_audio_reader.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,7 @@ inline void FFmpegAudioReader::Close() {
224224

225225
m_stream_index = -1;
226226

227-
if (m_codec_ctx) {
228-
avcodec_close(m_codec_ctx);
229-
m_codec_ctx = nullptr;
230-
}
227+
avcodec_free_context(&m_codec_ctx);
231228

232229
if (m_format_ctx) {
233230
avformat_close_input(&m_format_ctx);

0 commit comments

Comments
 (0)