Re: OpenMW 0.29.0
Posted: 19 Feb 2014, 22:04
Sorry if I'm stating the obvious but mVideoState::AudioTrack is uninitialised which results in a null pointer when trying to get its audio clock value:
Looking further it is initialised here but with an empty object according to the debugger:
So we don't seem to have a SoundManager initialised at this point, i.e. stream_open().
Code: Select all
// accumulate the clock difference
double diff = mVideoState->get_master_clock() - mVideoState->get_audio_clock();
mAudioDiffAccum = diff + mAudioDiffAvgCoef * mAudioDiffAccum;
if(mAudioDiffAvgCount < AUDIO_DIFF_AVG_NB)
mAudioDiffAvgCount++;
else
Code: Select all
switch(codecCtx->codec_type)
{
case AVMEDIA_TYPE_AUDIO:
this->audio_st = pFormatCtx->streams + stream_index;
decoder.reset(new MovieAudioDecoder(this));
this->AudioTrack = MWBase::Environment::get().getSoundManager()->playTrack(decoder, MWBase::SoundManager::Play_TypeMovie);
if(!this->AudioTrack)
{
avcodec_close((*this->audio_st)->codec);
this->audio_st = NULL;
return -1;
}
break;