fix ffm 7.xx

Origin commit data
------------------
Branch: master
Commit: 8879076689
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2025-07-19 (Sat, 19 Jul 2025)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
BPanther
2025-07-19 09:44:52 +02:00
committed by vanhofen
parent 1ea5d76752
commit dc31a20ae9

View File

@@ -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); avcodec_close(codec_context);
av_free(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); av_packet_unref(&packet);
} }
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100)
avcodec_close(codecContext); avcodec_close(codecContext);
av_free(codecContext); av_free(codecContext);
#else
avcodec_free_context(&codecContext);
#endif
} }
avformat_close_input(&formatContext); avformat_close_input(&formatContext);
} }