encoderd: use AV_CODEC_ID_H264 codec for qcamera encoding (#34498)

pull/34570/head
Dean Lee 2 months ago committed by GitHub
parent 3c0990e716
commit 644130ca3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      system/loggerd/encoder/ffmpeg_encoder.cc

@ -48,7 +48,10 @@ FfmpegEncoder::~FfmpegEncoder() {
} }
void FfmpegEncoder::encoder_open(const char* path) { 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); this->codec_ctx = avcodec_alloc_context3(codec);
assert(this->codec_ctx); assert(this->codec_ctx);

Loading…
Cancel
Save