summaryrefslogtreecommitdiff
path: root/src/call.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/call.c')
-rw-r--r--src/call.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/call.c b/src/call.c
index 752a2bd..d9a4a94 100644
--- a/src/call.c
+++ b/src/call.c
@@ -391,6 +391,18 @@ static void audio_error_handler(int err, const char *str, void *arg)
}
+static void video_error_handler(int err, const char *str, void *arg)
+{
+ struct call *call = arg;
+ MAGIC_CHECK(call);
+
+ warning("call: video device error: %m (%s)\n", err, str);
+
+ call_stream_stop(call);
+ call_event_handler(call, CALL_EVENT_CLOSED, str);
+}
+
+
static void menc_error_handler(int err, void *arg)
{
struct call *call = arg;
@@ -523,7 +535,8 @@ int call_alloc(struct call **callp, const struct config *cfg, struct list *lst,
acc->mnat, call->mnats,
acc->menc, call->mencs,
"main",
- account_vidcodecl(call->acc));
+ account_vidcodecl(call->acc),
+ video_error_handler, call);
if (err)
goto out;
}