|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|