core: fix warnings

This commit is contained in:
SachinVin
2023-06-09 22:48:42 +05:30
parent 796e8a9f24
commit 8eb89c260d
12 changed files with 55 additions and 42 deletions

View File

@@ -37,7 +37,7 @@ public:
protected:
~FFmpegStream();
void WritePacket(AVPacket& packet);
void WritePacket(AVPacket* packet);
void SendFrame(AVFrame* frame);
struct AVCodecContextDeleter {
@@ -52,6 +52,12 @@ protected:
}
};
struct AVPacketDeleter {
void operator()(AVPacket* packet) const {
av_packet_free(&packet);
}
};
AVFormatContext* format_context{};
std::mutex* format_context_mutex{};
std::unique_ptr<AVCodecContext, AVCodecContextDeleter> codec_context{};