Fix openh264 decoder frame loss

This commit is contained in:
dijunkun
2023-11-08 16:29:16 +08:00
parent 27bfcb7621
commit 007134838b
6 changed files with 26 additions and 75 deletions

View File

@@ -120,8 +120,8 @@ int OpenH264Encoder::Init() {
encoded_frame_ = new uint8_t[YUV420P_BUFFER_SIZE];
// int trace_level = WELS_LOG_WARNING;
// openh264_encoder_->SetOption(ENCODER_OPTION_TRACE_LEVEL, &trace_level);
int trace_level = WELS_LOG_QUIET;
openh264_encoder_->SetOption(ENCODER_OPTION_TRACE_LEVEL, &trace_level);
// Create encoder parameters based on the layer configuration.
SEncParamExt encoder_params = CreateEncoderParams();
@@ -196,7 +196,7 @@ int OpenH264Encoder::Encode(
return -1;
}
#if 0
#if 1
size_t required_capacity = 0;
size_t fragments_count = 0;
for (int layer = 0; layer < info.iLayerNum; ++layer) {