A bit more cleanup

actorid
Chris Robinson 12 years ago
parent 7e8b844b2e
commit f7ff8b3374

@ -791,8 +791,11 @@ public:
int audio_index = -1;
unsigned int i;
is->av_sync_type = DEFAULT_AV_SYNC_TYPE;
is->format_ctx = avformat_alloc_context();
is->videoStream = -1;
is->audioStream = -1;
is->refresh = 0;
is->quit = 0;
is->stream = Ogre::ResourceGroupManager::getSingleton ().openResource(resourceName);
@ -886,6 +889,9 @@ public:
void VideoPlayer::playVideo (const std::string &resourceName)
{
// Register all formats and codecs
av_register_all();
if (mState)
close();
@ -907,17 +913,9 @@ public:
mState = new VideoState;
// Register all formats and codecs
av_register_all();
mState->refresh = 0;
mState->resourceName = resourceName;
mState->av_sync_type = DEFAULT_AV_SYNC_TYPE;
mState->format_ctx = avformat_alloc_context();
init_state(mState, resourceName);
schedule_refresh(mState, 40);
init_state(mState, resourceName);
mState->parse_thread = boost::thread(decode_thread, mState);
}

@ -121,8 +121,7 @@ namespace MWRender
boost::thread parse_thread;
boost::thread video_thread;
std::string resourceName;
int quit;
volatile int quit;
int refresh;
int display_ready;

Loading…
Cancel
Save