summaryrefslogtreecommitdiff
path: root/avmedia/source/vlc
diff options
context:
space:
mode:
authorMinh Ngo <nlminhtl@gmail.com>2013-09-20 20:14:11 +0300
committerMinh Ngo <nlminhtl@gmail.com>2013-09-20 20:15:24 +0300
commit3d246af83bacacedb7c6a15e082210a67cd5566d (patch)
tree2df4dfcc539f88c575d5d8e543f83490a2cae438 /avmedia/source/vlc
parentccea730aefde5a74abb5c1525d25e7f96ea0a58e (diff)
Avmedia/VLC: Fixing a bug with a keyframe attaching
Change-Id: Iee28b510a79600e20a7e711d78ca20a216ccc3aa
Diffstat (limited to 'avmedia/source/vlc')
-rw-r--r--avmedia/source/vlc/vlcplayer.cxx12
-rw-r--r--avmedia/source/vlc/vlcwindow.cxx3
2 files changed, 11 insertions, 4 deletions
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index be863335bd98..a1fef95d8613 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -189,7 +189,6 @@ namespace
void SAL_CALL VLCPlayer::setWindowID( const intptr_t windowID )
{
::osl::MutexGuard aGuard( m_aMutex );
- mPrevWinID = windowID;
mPlayer.stop();
mPlayer.setWindow( windowID );
}
@@ -206,14 +205,21 @@ uno::Reference< css::media::XPlayerWindow > SAL_CALL VLCPlayer::createPlayerWind
::osl::MutexGuard aGuard( m_aMutex );
const intptr_t winID = GetWindowID( aArguments );
- VLCWindow * const window = new VLCWindow( *this, mPrevWinID );
+ VLCWindow * window;
+ if ( mPrevWinID == 0 )
+ {
+ mPrevWinID = winID;
+ window = new VLCWindow( *this, 0 );
+ }
+ else
+ window = new VLCWindow( *this, mPrevWinID );
if ( winID != -1 )
{
setWindowID( winID );
}
- return uno::Reference< css::media::XPlayerWindow >( window );
+ return ::com::sun::star::uno::Reference< css::media::XPlayerWindow >( window );
}
uno::Reference< css::media::XFrameGrabber > SAL_CALL VLCPlayer::createFrameGrabber()
diff --git a/avmedia/source/vlc/vlcwindow.cxx b/avmedia/source/vlc/vlcwindow.cxx
index cded4db20ed3..02fa74f46976 100644
--- a/avmedia/source/vlc/vlcwindow.cxx
+++ b/avmedia/source/vlc/vlcwindow.cxx
@@ -22,7 +22,8 @@ VLCWindow::VLCWindow( VLCPlayer& player, const intptr_t prevWinID )
VLCWindow::~VLCWindow()
{
- mPlayer.setWindowID( mPrevWinID );
+ if ( mPrevWinID != 0 )
+ mPlayer.setWindowID( mPrevWinID );
}
void SAL_CALL VLCWindow::update() throw (css::uno::RuntimeException)