From b4e55646d3e10c2b403a01cec633a3370ee009fe Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 31 Jul 2024 15:51:10 +0200 Subject: [PATCH] vcap/rtsp: suppress repeating message Do not repeat message "Setting the stream size to %ux%u\n" for the same size. --- src/video_capture/rtsp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video_capture/rtsp.c b/src/video_capture/rtsp.c index 2c6cf5422..14d046690 100644 --- a/src/video_capture/rtsp.c +++ b/src/video_capture/rtsp.c @@ -463,7 +463,9 @@ vidcap_rtsp_grab(void *state, struct audio_frame **audio) { pthread_mutex_unlock(&s->vrtsp_state.lock); pthread_cond_signal(&s->vrtsp_state.worker_cv); - if (frame->tiles[0].width != 0) { + if (frame->tiles[0].width != 0 && + s->vrtsp_state.desc.width != frame->tiles[0].width && + s->vrtsp_state.desc.height != frame->tiles[0].height) { MSG(VERBOSE, "Setting the stream size to %ux%u\n", frame->tiles[0].width, frame->tiles[0].height); s->vrtsp_state.desc.width = frame->tiles[0].width;