summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-03-23 18:44:43 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-03-23 18:44:43 +0100
commit0f9bcd8d0a4f36699efec96cc907833ace97600e (patch)
tree06b2e096c59b83a1771dab8f2f3d7e85653a5456 /src
parent0e2549e457074e2f2acb9044ef321d70ca8b83a6 (diff)
video: check if any video-source modules are loaded
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);