Skip to content

Commit

Permalink
Fixed a compilation warning with FFmpeg 7.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
punesemu committed Aug 25, 2024
1 parent 7fcc0d3 commit 49f86fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/recording.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ void recording_init(void) {
}
av_dict_free(&opts);
opts = NULL;
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0)
avcodec_close(test);
av_free(test);
#endif
avcodec_free_context(&test);
if (finded) {
break;
}
Expand Down Expand Up @@ -487,7 +489,9 @@ static void ffmpeg_fstream_close(_ffmpeg_stream *fs) {
fs->encode = FALSE;
fs->avc = NULL;
if (fs->avcc) {
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0)
avcodec_close(fs->avcc);
#endif
avcodec_free_context(&fs->avcc);
}
if (fs->avf) {
Expand Down

0 comments on commit 49f86fc

Please sign in to comment.