cid#1448380: Resource leak (avmedia/gstplayer)

Change-Id: Ieaf5f68f17558f27e187241869c8fe01f8e29ba2
Reviewed-on: https://gerrit.libreoffice.org/75094
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet
2019-07-04 18:09:26 +02:00
parent a98d5e849e
commit 72d88049bd

View File

@@ -846,10 +846,9 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
if( aSize.Width > 0 && aSize.Height > 0 )
{
::avmedia::gstreamer::Window* pWindow = new ::avmedia::gstreamer::Window;
if (rArguments.getLength() <= 2)
{
xRet = pWindow;
xRet = new ::avmedia::gstreamer::Window;
return xRet;
}
@@ -894,7 +893,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
return nullptr;
}
xRet = pWindow;
xRet = new ::avmedia::gstreamer::Window;
g_object_set(G_OBJECT(mpPlaybin), "video-sink", pVideosink, nullptr);
g_object_set(G_OBJECT(mpPlaybin), "force-aspect-ratio", FALSE, nullptr);