mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-12 11:13:46 +08:00
Reapply "Merge remote-tracking branch 'origin/master' into SunnyPilot"
This reverts commit 42b6ecb535.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user