summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/video.c b/src/video.c
index 6af81a9..a7eb97a 100644
--- a/src/video.c
+++ b/src/video.c
@@ -955,14 +955,19 @@ int video_start(struct video *v, const char *peer)
info("video: no video display\n");
}
- size.w = v->cfg.width;
- size.h = v->cfg.height;
- err = set_encoder_format(&v->vtx, v->cfg.src_mod,
- v->vtx.device, &size);
- if (err) {
- warning("video: could not set encoder format to"
- " [%u x %u] %m\n",
- size.w, size.h, err);
+ if (vidsrc_find(NULL)) {
+ size.w = v->cfg.width;
+ size.h = v->cfg.height;
+ err = set_encoder_format(&v->vtx, v->cfg.src_mod,
+ v->vtx.device, &size);
+ if (err) {
+ warning("video: could not set encoder format to"
+ " [%u x %u] %m\n",
+ size.w, size.h, err);
+ }
+ }
+ else {
+ info("video: no video source\n");
}
tmr_start(&v->tmr, TMR_INTERVAL * 1000, tmr_handler, v);