mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-06 14:16:39 +08:00
encoderd: use AV_CODEC_ID_H264 codec for qcamera encoding (#34498)
This commit is contained in:
@@ -48,7 +48,10 @@ FfmpegEncoder::~FfmpegEncoder() {
|
||||
}
|
||||
|
||||
void FfmpegEncoder::encoder_open(const char* path) {
|
||||
const AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_FFVHUFF);
|
||||
auto codec_id = encoder_info.encode_type == cereal::EncodeIndex::Type::QCAMERA_H264
|
||||
? AV_CODEC_ID_H264
|
||||
: AV_CODEC_ID_FFVHUFF;
|
||||
const AVCodec *codec = avcodec_find_encoder(codec_id);
|
||||
|
||||
this->codec_ctx = avcodec_alloc_context3(codec);
|
||||
assert(this->codec_ctx);
|
||||
|
||||
Reference in New Issue
Block a user