loggerd: remove deprecated av_init_packet usage (#35733)

remove deprecated av_init_packet
This commit is contained in:
Dean Lee
2025-07-16 00:27:12 +08:00
committed by GitHub
parent 97f6dc6e8c
commit 203b2e75d3
2 changed files with 2 additions and 7 deletions
+1 -4
View File
@@ -1,5 +1,3 @@
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#include "system/loggerd/encoder/ffmpeg_encoder.h"
#include <fcntl.h>
@@ -119,8 +117,7 @@ int FfmpegEncoder::encode_frame(VisionBuf* buf, VisionIpcBufExtra *extra) {
ret = -1;
}
AVPacket pkt;
av_init_packet(&pkt);
AVPacket pkt = {};
pkt.data = NULL;
pkt.size = 0;
while (ret >= 0) {
+1 -3
View File
@@ -1,4 +1,3 @@
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#include <cassert>
#include "system/loggerd/video_writer.h"
@@ -114,8 +113,7 @@ void VideoWriter::write(uint8_t *data, int len, long long timestamp, bool codecc
// input timestamps are in microseconds
AVRational in_timebase = {1, 1000000};
AVPacket pkt;
av_init_packet(&pkt);
AVPacket pkt = {};
pkt.data = data;
pkt.size = len;
pkt.stream_index = this->out_stream->index;