From 876aea33f58c53f533c33fe661cd0d35fdf4fbb0 Mon Sep 17 00:00:00 2001 From: xiongguangjie Date: Thu, 23 Mar 2023 18:14:28 +0800 Subject: [PATCH] avoid fps too big --- server/WebApi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index 113df96f..2ea229c0 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -382,7 +382,7 @@ Value makeMediaSourceJson(MediaSource &media){ int gop_size = video_track->getVideoGopSize(); int gop_interval_ms = video_track->getVideoGopInterval(); float fps = video_track->getVideoFps(); - if (fps <= 1) { + if (fps <= 1 && gop_interval_ms) { fps = gop_size * 1000.0 / gop_interval_ms; } obj["fps"] = round(fps);