0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00

linux-v4l2: Fix deprecation with FFmpeg 7

FFmpeg 7 header states that avcodec_close should not be used since
avcodev_free_context already close the context.
This commit is contained in:
tytan652 2024-04-06 08:51:40 +02:00 committed by Lain
parent 8dbad9ac29
commit 7d4501131a

View File

@ -78,7 +78,9 @@ void v4l2_destroy_decoder(struct v4l2_decoder *decoder)
}
if (decoder->context) {
#if LIBAVCODEC_VERSION_MAJOR < 61
avcodec_close(decoder->context);
#endif
avcodec_free_context(&decoder->context);
}
}