mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2026-07-17 16:36:49 +00:00
Merge branch 'feature/VNC-373_drop_avcodec_close' into 'master'
Drop avcodec_close for FFmpeg 8 compatibility Closes VNC-373 See merge request kasm-technologies/internal/KasmVNC!240
This commit is contained in:
commit
70b1311c91
4 changed files with 5 additions and 11 deletions
|
|
@ -7,7 +7,10 @@ ENV DEBIAN_FRONTEND noninteractive
|
|||
ENV CXXFLAGS="-Wno-stringop-overflow"
|
||||
ENV CFLAGS="-Wno-stringop-overflow"
|
||||
|
||||
RUN sed -i 's/Types: deb/Types: deb deb-src/' /etc/apt/sources.list.d/kali.sources
|
||||
RUN find /etc/apt/sources.list.d/ -name "*.sources" | xargs -r sed -i 's/^Types: deb$/Types: deb deb-src/'; \
|
||||
{ [ -f /etc/apt/sources.list ] && grep '^deb ' /etc/apt/sources.list 2>/dev/null; \
|
||||
find /etc/apt/sources.list.d/ -name "*.list" -exec grep -h '^deb ' {} \; 2>/dev/null; } | \
|
||||
sed 's/^deb /deb-src /' >> /etc/apt/sources.list.d/kali-deb-src.list; true
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y install sudo
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@
|
|||
|
||||
FfmpegFrameFeeder::FfmpegFrameFeeder(FFmpeg *ffmpeg_) : ffmpeg{ffmpeg_} {}
|
||||
|
||||
FfmpegFrameFeeder::~FfmpegFrameFeeder() {
|
||||
ffmpeg->avcodec_close(codec_ctx_guard.get());
|
||||
}
|
||||
FfmpegFrameFeeder::~FfmpegFrameFeeder() = default;
|
||||
|
||||
void FfmpegFrameFeeder::open(const std::string_view path) {
|
||||
AVFormatContext *format_ctx{};
|
||||
|
|
|
|||
|
|
@ -120,7 +120,6 @@ FFmpeg::FFmpeg() {
|
|||
avcodec_receive_packet_f = D_LOOKUP_SYM(handle, avcodec_receive_packet);
|
||||
av_packet_unref_f = D_LOOKUP_SYM(handle, av_packet_unref);
|
||||
avcodec_flush_buffers_f = D_LOOKUP_SYM(handle, avcodec_flush_buffers);
|
||||
avcodec_close_f = D_LOOKUP_SYM(handle, avcodec_close);
|
||||
av_codec_is_encoder_f = D_LOOKUP_SYM(handle, av_codec_is_encoder);
|
||||
av_packet_alloc_f = D_LOOKUP_SYM(handle, av_packet_alloc);
|
||||
av_packet_free_f = D_LOOKUP_SYM(handle, av_packet_free);
|
||||
|
|
|
|||
|
|
@ -137,7 +137,6 @@ class FFmpeg final {
|
|||
using avcodec_receive_frame_func = int (*)(AVCodecContext *avctx, AVFrame *frame);
|
||||
using av_packet_unref_func = void (*)(AVPacket *pkt);
|
||||
using avcodec_flush_buffers_func = void (*)(AVCodecContext *avctx);
|
||||
using avcodec_close_func = int (*)(AVCodecContext *avctx);
|
||||
using av_codec_is_encoder_func = int (*)(const AVCodec *codec);
|
||||
|
||||
// libavfilter
|
||||
|
|
@ -201,7 +200,6 @@ class FFmpeg final {
|
|||
avcodec_receive_packet_func avcodec_receive_packet_f{};
|
||||
av_packet_unref_func av_packet_unref_f{};
|
||||
avcodec_flush_buffers_func avcodec_flush_buffers_f{};
|
||||
avcodec_close_func avcodec_close_f{};
|
||||
av_codec_is_encoder_func av_codec_is_encoder_f{};
|
||||
|
||||
// libavfilter
|
||||
|
|
@ -386,10 +384,6 @@ public:
|
|||
avcodec_flush_buffers_f(avctx);
|
||||
}
|
||||
|
||||
int avcodec_close(AVCodecContext *avctx) const {
|
||||
return avcodec_close_f(avctx);
|
||||
}
|
||||
|
||||
int av_codec_is_encoder(const AVCodec *codec) const {
|
||||
return av_codec_is_encoder_f(codec);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue