From dc31a20ae9dc6255515b0b40152a58171e4039c6 Mon Sep 17 00:00:00 2001 From: BPanther Date: Sat, 19 Jul 2025 09:44:52 +0200 Subject: [PATCH] fix ffm 7.xx Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/8879076689ab77d3d0db6a422fbb5fce20c86313 Author: BPanther Date: 2025-07-19 (Sat, 19 Jul 2025) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 4a21cc6..6201f53 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -320,8 +320,12 @@ void write_frame(AVFrame *in_frame, int fd) } } } +#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100) avcodec_close(codec_context); av_free(codec_context); +#else + avcodec_free_context(&codec_context); +#endif } } } @@ -458,8 +462,12 @@ int image_to_mpeg2(const char *image_name, int fd) } av_packet_unref(&packet); } +#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100) avcodec_close(codecContext); av_free(codecContext); +#else + avcodec_free_context(&codecContext); +#endif } avformat_close_input(&formatContext); }