Commit c4b270a6 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

MediaPlayer: Don't watch for keyboard input.

This introduce a segfault when stopping the media, patch has been sent
to VLC.
parent 1722911f
......@@ -256,3 +256,9 @@ MediaPlayer::getNbVideoTrack()
int res = libvlc_video_get_track_count( m_internalPtr );
return res;
}
void
MediaPlayer::setKeyInput( bool enabled )
{
libvlc_video_set_key_input( m_internalPtr, enabled );
}
......@@ -63,6 +63,7 @@ namespace LibVLCpp
QString getLoadedMRL();
int getNbAudioTrack();
int getNbVideoTrack();
void setKeyInput( bool enabled );
private:
static void callbacks( const libvlc_event_t* event, void* self );
......
......@@ -98,6 +98,7 @@ ClipRenderer::startPreview()
delete m_vlcMedia;
m_vlcMedia = new LibVLCpp::Media( m_selectedClip->getMedia()->fileInfo()->absoluteFilePath() );
m_mediaPlayer->setKeyInput( false );
m_mediaPlayer->setMedia( m_vlcMedia );
m_mediaPlayer->play();
......
......@@ -224,6 +224,7 @@ void WorkflowRenderer::startPreview()
m_outputFps = outputFps();
setupRenderer( m_width, m_height, m_outputFps );
}
m_mediaPlayer->setKeyInput( false );
m_mediaPlayer->setMedia( m_media );
//Media player part: to update PreviewWidget
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment