summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/call.c2
-rw-r--r--src/video.c18
2 files changed, 16 insertions, 4 deletions
diff --git a/src/call.c b/src/call.c
index 16df3ca..20b2ff1 100644
--- a/src/call.c
+++ b/src/call.c
@@ -589,6 +589,8 @@ int call_alloc(struct call **callp, const struct config *cfg, struct list *lst,
&& (list_head(account_vidcodecl(call->acc)) != NULL)
&& (NULL != vidsrc_find(NULL) || NULL != vidisp_find(NULL));
+ debug("call: use_video=%d\n", use_video);
+
/* Video stream */
if (use_video) {
err = video_alloc(&call->video, cfg,
diff --git a/src/video.c b/src/video.c
index 2f61d77..c13b6e9 100644
--- a/src/video.c
+++ b/src/video.c
@@ -943,10 +943,15 @@ int video_start(struct video *v, const char *peer)
stream_set_srate(v->strm, SRATE, SRATE);
- err = set_vidisp(&v->vrx);
- if (err) {
- warning("video: could not set vidisp '%s': %m\n",
- v->vrx.device, err);
+ if (vidisp_find(NULL)) {
+ err = set_vidisp(&v->vrx);
+ if (err) {
+ warning("video: could not set vidisp '%s': %m\n",
+ v->vrx.device, err);
+ }
+ }
+ else {
+ info("video: no video display\n");
}
size.w = v->cfg.width;
@@ -1075,6 +1080,11 @@ int video_encoder_set(struct video *v, struct vidcodec *vc,
vtx = &v->vtx;
+ if (!vc->encupdh) {
+ info("video: vidcodec '%s' has no encoder\n", vc->name);
+ return ENOENT;
+ }
+
if (vc != vtx->vc) {
struct videnc_param prm;