mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 12:45:35 +08:00
[fix] fix nvidia encoder crash during reconfigure the resolution
This commit is contained in:
@@ -358,10 +358,12 @@ int OpenH264Encoder::OnEncodedImage(char *encoded_packets, size_t size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OpenH264Encoder::ForceIdr() {
|
||||
int OpenH264Encoder::ForceIdr() {
|
||||
if (openh264_encoder_) {
|
||||
openh264_encoder_->ForceIntraFrame(true);
|
||||
return openh264_encoder_->ForceIntraFrame(true);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int OpenH264Encoder::Release() {
|
||||
|
||||
@@ -37,7 +37,7 @@ class OpenH264Encoder : public VideoEncoder {
|
||||
|
||||
int OnEncodedImage(char* encoded_packets, size_t size);
|
||||
|
||||
void ForceIdr();
|
||||
int ForceIdr();
|
||||
|
||||
private:
|
||||
int InitEncoderParams(int width, int height);
|
||||
|
||||
Reference in New Issue
Block a user