forked from mirror/openmw-tes3mp
Merge pull request #1757 from akortunov/musicfix
Handle exception when try to load non-music file
This commit is contained in:
commit
664edc5a39
2 changed files with 13 additions and 9 deletions
|
@ -32,6 +32,7 @@
|
|||
Bug #4327: Missing animations during spell/weapon stance switching
|
||||
Bug #4368: Settings window ok button doesn't have key focus by default
|
||||
Bug #4393: NPCs walk back to where they were after using ResetActors
|
||||
Bug #4416: Handle exception if we try to play non-music file
|
||||
Bug #4419: MRK NiStringExtraData is handled incorrectly
|
||||
Bug #4426: RotateWorld behavior is incorrect
|
||||
Bug #4429: [Windows] Error on build INSTALL.vcxproj project (debug) with cmake 3.7.2
|
||||
|
|
|
@ -251,11 +251,14 @@ void FFmpeg_Decoder::open(const std::string &fname)
|
|||
if(mOutputChannelLayout == 0)
|
||||
mOutputChannelLayout = av_get_default_channel_layout((*mStream)->codec->channels);
|
||||
}
|
||||
catch(...) {
|
||||
catch(...)
|
||||
{
|
||||
if(mStream)
|
||||
avcodec_close((*mStream)->codec);
|
||||
mStream = NULL;
|
||||
|
||||
if (mFormatCtx != NULL)
|
||||
{
|
||||
if (mFormatCtx->pb->buffer != NULL)
|
||||
{
|
||||
av_free(mFormatCtx->pb->buffer);
|
||||
|
@ -265,7 +268,7 @@ void FFmpeg_Decoder::open(const std::string &fname)
|
|||
mFormatCtx->pb = NULL;
|
||||
|
||||
avformat_close_input(&mFormatCtx);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue