diff options
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/opengl/oglplayer.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx index fb94c5a33c3c..22ff457f8bae 100644 --- a/avmedia/source/opengl/oglplayer.cxx +++ b/avmedia/source/opengl/oglplayer.cxx @@ -234,7 +234,15 @@ uno::Reference< media::XPlayerWindow > SAL_CALL OGLPlayer::createPlayerWindow( c m_pHandle->viewport.y = 0; m_pHandle->viewport.width = aSize.Width(); m_pHandle->viewport.height = aSize.Height(); - gltf_renderer_set_content(m_pHandle); + + // TODO: In libgltf different return values are defined (for different errors) + // but these error codes are not part of the library interface + int nRet = gltf_renderer_set_content(m_pHandle); + if( nRet != 0 ) + { + SAL_WARN("avmedia.opengl", "Error occured while parsing *.json file! Error code: " << nRet); + return uno::Reference< media::XPlayerWindow >(); + } m_pOGLWindow = new OGLWindow(m_pHandle, &m_aContext, pChildWindow); return uno::Reference< media::XPlayerWindow >( m_pOGLWindow ); } @@ -254,7 +262,13 @@ uno::Reference< media::XFrameGrabber > SAL_CALL OGLPlayer::createFrameGrabber() m_pHandle->viewport.y = 0; m_pHandle->viewport.width = getPreferredPlayerWindowSize().Width; m_pHandle->viewport.height = getPreferredPlayerWindowSize().Height; - gltf_renderer_set_content(m_pHandle); + + int nRet = gltf_renderer_set_content(m_pHandle); + if( nRet != 0 ) + { + SAL_WARN("avmedia.opengl", "Error occured while parsing *.json file! Error code: " << nRet); + return uno::Reference< media::XFrameGrabber >(); + } OGLFrameGrabber *pFrameGrabber = new OGLFrameGrabber( m_pHandle ); return uno::Reference< media::XFrameGrabber >( pFrameGrabber ); } |