Fix openh264 decode error caused by yuv stride

This commit is contained in:
dijunkun
2023-11-06 19:02:39 -08:00
parent 5ae756bf7f
commit 325f626fb5
9 changed files with 175 additions and 39 deletions

View File

@@ -38,14 +38,15 @@ class OpenH264Encoder : public VideoEncoder {
private:
int frame_width_ = 1280;
int frame_height_ = 720;
int key_frame_interval_ = 3000;
int key_frame_interval_ = 5;
int target_bitrate_ = 1000;
int max_bitrate_ = 1000;
int max_payload_size_ = 3000;
int max_frame_rate_ = 30;
std::vector<std::vector<uint8_t>> encoded_packets_;
unsigned char* encoded_image_ = nullptr;
FILE* file_ = nullptr;
FILE* file_h264_ = nullptr;
FILE* file_nv12_ = nullptr;
unsigned char* nv12_data_ = nullptr;
unsigned int seq_ = 0;