Skip to content

Commit 4cec824

Browse files
committed
fixed fps limit for h264
1 parent ac19894 commit 4cec824

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ustreamer/stream.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,10 @@ static void *_h264_thread(void *v_ctx) {
433433
goto decref;
434434
}
435435

436-
const uint fps_limit = US_MAX(stream->run->h264_enc->run->fps_limit, stream->desired_fps);
436+
uint fps_limit = stream->run->h264_enc->run->fps_limit;
437+
if (stream->desired_fps > 0 && (fps_limit == 0 || stream->desired_fps < fps_limit)) {
438+
fps_limit = stream->desired_fps;
439+
}
437440
if (fps_limit > 0) {
438441
const uint captured_fps = us_fpsi_get(stream->run->http->captured_fpsi, NULL);
439442
take = ceilf((float)captured_fps / (float)fps_limit);

0 commit comments

Comments
 (0)