summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-07-04 18:09:26 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-07-04 19:03:35 +0200
commit72d88049bdac3417f6833255dff5a06a0f3eb1c3 (patch)
tree3fe579be1c97be2cf10106117937a9fc8c324022 /avmedia
parenta98d5e849e8eb21c04b7f95e8c7b44b6ef582bda (diff)
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>
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/gstreamer/gstplayer.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 35feb8ad5ea2..111622cbac9c 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -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);