From 740eac982a2f15c93d30499a8972a8c9d5144f4f Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Thu, 20 Apr 2017 11:19:07 +0200 Subject: [PATCH] fix(coreapi/linphonecore): fix preview ogl render, use now output2 --- coreapi/linphonecore.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 1aceead89..8eb7f8148 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5464,12 +5464,10 @@ void linphone_core_preview_ogl_render(const LinphoneCore *lc) { #ifdef VIDEO_ENABLED LinphoneCall *call = linphone_core_get_current_call(lc); - VideoStream *stream; + VideoStream *stream = call ? call->videostream : lc->previewstream; - if (call && (stream = call->videostream) && stream->output2 && ms_filter_get_id(stream->output2) == MS_OGL_ID) + if (stream && stream->output2 && ms_filter_get_id(stream->output2) == MS_OGL_ID) ms_filter_call_method(stream->output2, MS_OGL_RENDER, NULL); - else if ((stream = lc->previewstream) && stream->output && ms_filter_get_id(stream->output) == MS_OGL_ID) - ms_filter_call_method(stream->output, MS_OGL_RENDER, NULL); #endif }