[fix] fix openh264 encoder resolution change failed

This commit is contained in:
dijunkun
2024-09-06 16:57:23 +08:00
parent 255ef0edec
commit 2f16d22ab7
3 changed files with 22 additions and 15 deletions

View File

@@ -40,7 +40,7 @@ class OpenH264Encoder : public VideoEncoder {
void ForceIdr();
private:
int InitEncoderParams();
int InitEncoderParams(int width, int height);
int ResetEncodeResolution(unsigned int width, unsigned int height);
int Release();
@@ -63,6 +63,7 @@ class OpenH264Encoder : public VideoEncoder {
// openh264
ISVCEncoder* openh264_encoder_ = nullptr;
SEncParamExt encoder_params_;
int video_format_;
SSourcePicture raw_frame_;
unsigned char* yuv420p_frame_ = nullptr;
int yuv420p_frame_capacity_ = 0;