Reapply "Merge remote-tracking branch 'origin/master' into SunnyPilot"

This reverts commit 42b6ecb535.
This commit is contained in:
firestar5683
2025-08-11 18:44:44 -05:00
parent f56b049010
commit 076fbbe102
318 changed files with 11962 additions and 8595 deletions
+2 -5
View File
@@ -1,5 +1,3 @@
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#include "system/loggerd/encoder/ffmpeg_encoder.h"
#include <fcntl.h>
@@ -48,7 +46,7 @@ FfmpegEncoder::~FfmpegEncoder() {
}
void FfmpegEncoder::encoder_open() {
auto codec_id = encoder_info.encode_type == cereal::EncodeIndex::Type::QCAMERA_H264
auto codec_id = encoder_info.get_settings(in_width).encode_type == cereal::EncodeIndex::Type::QCAMERA_H264
? AV_CODEC_ID_H264
: AV_CODEC_ID_FFVHUFF;
const AVCodec *codec = avcodec_find_encoder(codec_id);
@@ -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) {