summaryrefslogtreecommitdiff
path: root/src/video.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-07 21:30:04 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-07 21:30:04 +0100
commit5b7bb10e612704862dd72fa337f29bd48d34cac5 (patch)
tree393fcaa08f29ab238e7b5b0634b9a3b146aeb88d /src/video.c
parent618120a71690ea84ec05e4ae1473a2df6f78dd99 (diff)
test: added testcase for call with video
Diffstat (limited to 'src/video.c')
-rw-r--r--src/video.c18
1 files changed, 14 insertions, 4 deletions
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;