Fix OBU total length error

This commit is contained in:
dijunkun
2024-04-24 17:27:53 +08:00
parent 5deaacab51
commit 76465a95c2
8 changed files with 30 additions and 28 deletions

View File

@@ -20,8 +20,6 @@ extern "C" {
};
#endif
#include "obu_parser.h"
#define SAVE_NV12_STREAM 0
#define SAVE_H264_STREAM 1
@@ -342,13 +340,6 @@ int AomAv1Encoder::Encode(
SET_ENCODER_PARAM_OR_RETURN_ERROR(AOME_GET_LAST_QUANTIZER, &qp);
LOG_INFO("Encoded frame qp = {}", qp);
std::vector<Obu> obus = ParseObus(encoded_frame_, encoded_frame_size_);
for (int i = 0; i < obus.size(); i++) {
LOG_ERROR("[{}] Obu size = [{}], Obu type [{}]", i,
obus[i].payload_size_,
ObuTypeToString((OBU_TYPE)ObuType(obus[i].header_)));
}
if (on_encoded_image) {
on_encoded_image((char *)encoded_frame_, encoded_frame_size_);
if (SAVE_H264_STREAM) {