Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel: Fix demux SPS error for NVENC and LARIX. v6.0.22 #3389

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Kernel: init struct SrsHevcProfileTierLevel.
  • Loading branch information
chundonglinlin committed Feb 1, 2023
commit 6cf3672997f961a275a5f38a29ebb315364f5a12
1 change: 0 additions & 1 deletion trunk/src/kernel/srs_kernel_codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,6 @@ srs_error_t SrsFormat::hevc_demux_sps_rbsp(char* rbsp, int nb_rbsp)

// profile tier level...
SrsHevcProfileTierLevel profile_tier_level;
memset((void*)&profile_tier_level, 0, sizeof(profile_tier_level));
// profile_tier_level(1, sps_max_sub_layers_minus1)
if ((err = hevc_demux_rbsp_ptl(&bs, &profile_tier_level, 1, sps_max_sub_layers_minus1)) != srs_success) {
return srs_error_wrap(err, "sps rbsp ptl sps_max_sub_layers_minus1=%d", sps_max_sub_layers_minus1);
Expand Down
30 changes: 30 additions & 0 deletions trunk/src/kernel/srs_kernel_codec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,36 @@ struct SrsHevcProfileTierLevel
std::vector<uint8_t> sub_layer_inbld_flag;
std::vector<uint8_t> sub_layer_reserved_zero_bit;
std::vector<uint8_t> sub_layer_level_idc;

SrsHevcProfileTierLevel() {
general_profile_space = 0;
general_tier_flag = 0;
general_profile_idc = 0;
memset(general_profile_compatibility_flag, 0, 32);
general_progressive_source_flag = 0;
general_interlaced_source_flag = 0;
general_non_packed_constraint_flag = 0;
general_frame_only_constraint_flag = 0;
general_max_12bit_constraint_flag = 0;
general_max_10bit_constraint_flag = 0;
general_max_8bit_constraint_flag = 0;
general_max_422chroma_constraint_flag = 0;
general_max_420chroma_constraint_flag = 0;
general_max_monochrome_constraint_flag = 0;
general_intra_constraint_flag = 0;
general_one_picture_only_constraint_flag = 0;
general_lower_bit_rate_constraint_flag = 0;
general_max_14bit_constraint_flag = 0;
general_reserved_zero_7bits = 0;
general_reserved_zero_33bits = 0;
general_reserved_zero_34bits = 0;
general_reserved_zero_35bits = 0;
general_reserved_zero_43bits = 0;
general_inbld_flag = 0;
general_reserved_zero_bit = 0;
general_level_idc = 0;
memset(reserved_zero_2bits, 0, 8);
}
};

/**
Expand Down