ensure fps is not 0.

This commit is contained in:
Miroslav Šedivý 2023-01-29 18:34:58 +01:00
parent 64b79f4579
commit 79a1c41938

View File

@ -61,6 +61,11 @@ func NewVideoPipeline(rtpCodec codec.RTPCodec, display string, pipelineSrc strin
return pipelineStr, nil return pipelineStr, nil
} }
// use default fps if not set
if fps == 0 {
fps = 25
}
switch rtpCodec.Name { switch rtpCodec.Name {
case codec.VP8().Name: case codec.VP8().Name:
if hwenc == "VAAPI" { if hwenc == "VAAPI" {