From fc47c0eff255df5ff43ca98486b5d4891c233d03 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 14 Apr 2016 10:11:32 +0200 Subject: [PATCH] Fix unused variable/function when building without video --- coreapi/linphonecore.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 6a7733d19..d463fd2e0 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5357,6 +5357,7 @@ void linphone_core_migrate_logs_from_rc_to_db(LinphoneCore *lc) { * Video related functions * ******************************************************************************/ +#ifdef VIDEO_ENABLED static void snapshot_taken(void *userdata, struct _MSFilter *f, unsigned int id, void *arg) { if (id == MS_JPEG_WRITER_SNAPSHOT_TAKEN) { LinphoneCore *lc = (LinphoneCore *)userdata; @@ -5364,15 +5365,16 @@ static void snapshot_taken(void *userdata, struct _MSFilter *f, unsigned int id, linphone_core_enable_video_preview(lc, FALSE); } } +#endif int linphone_core_take_preview_snapshot(LinphoneCore *lc, const char *file) { LinphoneCall *call = linphone_core_get_current_call(lc); if (!file) return -1; -#ifdef VIDEO_ENABLED if (call) { return linphone_call_take_preview_snapshot(call, file); } else { +#ifdef VIDEO_ENABLED if (lc->previewstream == NULL) { MSVideoSize vsize=lc->video_conf.preview_vsize.width != 0 ? lc->video_conf.preview_vsize : lc->video_conf.vsize; lc->previewstream = video_preview_new(lc->factory); @@ -5389,8 +5391,8 @@ int linphone_core_take_preview_snapshot(LinphoneCore *lc, const char *file) { ms_filter_call_method(lc->previewstream->local_jpegwriter, MS_JPEG_WRITER_TAKE_SNAPSHOT, (void*)file); } return 0; - } #endif + } return -1; }