mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
A bit more cleanup
This commit is contained in:
parent
7e8b844b2e
commit
f7ff8b3374
@ -791,8 +791,11 @@ public:
|
|||||||
int audio_index = -1;
|
int audio_index = -1;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
is->av_sync_type = DEFAULT_AV_SYNC_TYPE;
|
||||||
|
is->format_ctx = avformat_alloc_context();
|
||||||
is->videoStream = -1;
|
is->videoStream = -1;
|
||||||
is->audioStream = -1;
|
is->audioStream = -1;
|
||||||
|
is->refresh = 0;
|
||||||
is->quit = 0;
|
is->quit = 0;
|
||||||
|
|
||||||
is->stream = Ogre::ResourceGroupManager::getSingleton ().openResource(resourceName);
|
is->stream = Ogre::ResourceGroupManager::getSingleton ().openResource(resourceName);
|
||||||
@ -886,6 +889,9 @@ public:
|
|||||||
|
|
||||||
void VideoPlayer::playVideo (const std::string &resourceName)
|
void VideoPlayer::playVideo (const std::string &resourceName)
|
||||||
{
|
{
|
||||||
|
// Register all formats and codecs
|
||||||
|
av_register_all();
|
||||||
|
|
||||||
if (mState)
|
if (mState)
|
||||||
close();
|
close();
|
||||||
|
|
||||||
@ -907,17 +913,9 @@ public:
|
|||||||
|
|
||||||
mState = new VideoState;
|
mState = new VideoState;
|
||||||
|
|
||||||
// Register all formats and codecs
|
init_state(mState, resourceName);
|
||||||
av_register_all();
|
|
||||||
|
|
||||||
mState->refresh = 0;
|
|
||||||
mState->resourceName = resourceName;
|
|
||||||
mState->av_sync_type = DEFAULT_AV_SYNC_TYPE;
|
|
||||||
mState->format_ctx = avformat_alloc_context();
|
|
||||||
|
|
||||||
schedule_refresh(mState, 40);
|
schedule_refresh(mState, 40);
|
||||||
|
|
||||||
init_state(mState, resourceName);
|
|
||||||
mState->parse_thread = boost::thread(decode_thread, mState);
|
mState->parse_thread = boost::thread(decode_thread, mState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,8 +121,7 @@ namespace MWRender
|
|||||||
boost::thread parse_thread;
|
boost::thread parse_thread;
|
||||||
boost::thread video_thread;
|
boost::thread video_thread;
|
||||||
|
|
||||||
std::string resourceName;
|
volatile int quit;
|
||||||
int quit;
|
|
||||||
|
|
||||||
int refresh;
|
int refresh;
|
||||||
int display_ready;
|
int display_ready;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user