summaryrefslogtreecommitdiff
path: root/src/video.c
diff options
context:
space:
mode:
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;