[Libreoffice-commits] core.git: avmedia/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 23 06:31:28 UTC 2021
avmedia/source/gstreamer/gstmanager.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 239d3a850dd3bef82c050fd727f4dbd5cf8ae0af
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Mon Feb 22 19:43:35 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Feb 23 07:30:42 2021 +0100
loplugin:refcounting in avmedia
Change-Id: I150a0f9ffe6ca10d9e92af347e5cc4b87a828125
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111351
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/avmedia/source/gstreamer/gstmanager.cxx b/avmedia/source/gstreamer/gstmanager.cxx
index bc7c917dc99d..1803b5880bc1 100644
--- a/avmedia/source/gstreamer/gstmanager.cxx
+++ b/avmedia/source/gstreamer/gstmanager.cxx
@@ -23,6 +23,7 @@
#include "gstplayer.hxx"
#include <tools/urlobj.hxx>
+#include <rtl/ref.hxx>
using namespace ::com::sun::star;
@@ -38,14 +39,13 @@ Manager::~Manager()
uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString& rURL )
{
- Player* pPlayer( new Player );
- uno::Reference< media::XPlayer > xRet( pPlayer );
+ rtl::Reference<Player> pPlayer( new Player );
const INetURLObject aURL( rURL );
if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ) )
- xRet.clear();
+ pPlayer.clear();
- return xRet;
+ return pPlayer;
}
OUString SAL_CALL Manager::getImplementationName( )
More information about the Libreoffice-commits
mailing list