Skip to content

Commit

Permalink
Merge pull request xbmc#441 from FernetMenta/mainline
Browse files Browse the repository at this point in the history
video player: do not call render functions from video thread, fix segfault
  • Loading branch information
elupus committed Sep 29, 2011
2 parents 09c7df8 + 57db2e4 commit 156e9ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 5 additions & 0 deletions xbmc/cores/dvdplayer/DVDPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,11 @@ bool CDVDPlayer::OpenFile(const CFileItem& file, const CPlayerOptions &options)
m_filename = file.GetPath();

m_ready.Reset();

#if defined(HAS_VIDEO_PLAYBACK)
g_renderManager.PreInit();
#endif

Create();
if(!m_ready.WaitMSec(100))
{
Expand Down
7 changes: 0 additions & 7 deletions xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,6 @@ bool CDVDPlayerVideo::OpenStream( CDVDStreamInfo &hint )
{
unsigned int surfaces = 0;
#ifdef HAS_VIDEO_PLAYBACK
if(!m_output.inited)
{
g_renderManager.PreInit();
m_output.inited = true;
}
surfaces = g_renderManager.GetProcessorSize();
#endif

Expand Down Expand Up @@ -750,8 +745,6 @@ void CDVDPlayerVideo::OnExit()
m_pOverlayCodecCC = NULL;
}

m_output.inited = false;

CLog::Log(LOGNOTICE, "thread end: video_thread");
}

Expand Down
1 change: 0 additions & 1 deletion xbmc/cores/dvdplayer/DVDPlayerVideo.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ class CDVDPlayerVideo : public CThread
unsigned int color_primaries;
unsigned int color_transfer;
double framerate;
bool inited;
} m_output; //holds currently configured output

bool m_bAllowFullscreen;
Expand Down

0 comments on commit 156e9ed

Please sign in to comment.