diff --git a/console/commands.c b/console/commands.c index a2f4a73ff..792d023b0 100644 --- a/console/commands.c +++ b/console/commands.c @@ -1056,11 +1056,8 @@ lpc_cmd_staticpic(LinphoneCore *lc, char *args) } if (strcmp(arg1, "set")==0 && arg2) { -#ifdef VIDEO_ENABLED - return linphone_core_set_static_picture(lc, arg2); -#else - linphonec_out("Sorry, linphonec was compiled without video capabilities.\n"); -#endif + linphone_core_set_static_picture(lc, arg2); + return 1; } return 0; /* Syntax error */ diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 1f553066a..d77379451 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3089,8 +3089,8 @@ const char *linphone_core_get_video_device(const LinphoneCore *lc){ } int linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { +#ifdef VIDEO_ENABLED VideoStream *vs = NULL; - /* Select the video stream from the call in the first place */ if (lc && lc->videostream) { vs = lc->videostream; @@ -3113,7 +3113,9 @@ int linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { /* Tell the static image filter to use that image from now on so that the image will be used next time it has to be read */ ms_static_image_set_default_image(path); - +#else + ms_warning("Video support not compiled."); +#endif return 0; }