From 48df8f882a4c8c73c13f04f32c2e3a195fe320db Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 19 Oct 2013 22:59:41 +0200 Subject: [PATCH] raspi: fix ordering of AVDec and GLFB it looks like the videocore libs are leaking objects if OMX_Init() is called after the dispmanx setup, so do it in the correct order --- raspi/glfb.cpp | 2 +- raspi/init.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/raspi/glfb.cpp b/raspi/glfb.cpp index 45d6473..ccaaf70 100644 --- a/raspi/glfb.cpp +++ b/raspi/glfb.cpp @@ -118,7 +118,7 @@ void GLFramebuffer::setup() /* global alpha nontransparent (255) */ VC_DISPMANX_ALPHA_T alpha = { DISPMANX_FLAGS_ALPHA_FROM_SOURCE, 255, 0 }; - bcm_host_init(); + // bcm_host_init(); // already done in AVDec() display = vc_dispmanx_display_open(0); ret = vc_dispmanx_display_get_info(display, &info); diff --git a/raspi/init.cpp b/raspi/init.cpp index 2d47e15..49c22d1 100644 --- a/raspi/init.cpp +++ b/raspi/init.cpp @@ -196,6 +196,8 @@ void init_td_api() if (!initialized) lt_debug_init(); lt_info("%s begin, initialized=%d, debug=0x%02x\n", __func__, (int)initialized, debuglevel); + if (! avdec) + avdec = new AVDec(); if (! glfb) { int x = 1280, y = 720; /* default OSD FB resolution */ /* @@ -218,8 +220,6 @@ void init_td_api() } if (! thread) thread = new Input(); - if (! avdec) - avdec = new AVDec(); initialized = true; }