Reset the decoder when D3D state is lost

This commit is contained in:
Cameron Gutman
2018-07-20 15:31:57 -07:00
parent 86874a2e1c
commit 10b5245919
4 changed files with 67 additions and 39 deletions

View File

@@ -128,14 +128,9 @@ FFmpegVideoDecoder::~FFmpegVideoDecoder()
}
}
avcodec_close(m_VideoDecoderCtx);
av_free(m_VideoDecoderCtx);
m_VideoDecoderCtx = nullptr;
m_HwDecodeCfg = nullptr;
avcodec_free_context(&m_VideoDecoderCtx);
delete m_Renderer;
m_Renderer = nullptr;
}
bool FFmpegVideoDecoder::initialize(