mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-16 12:05:38 +00:00
Fixed a glitch in VideoFFmpegComponent as the video texture was not properly reset.
This commit is contained in:
parent
197e933a1f
commit
badcfb0fe9
|
@ -42,14 +42,11 @@ VideoFFmpegComponent::VideoFFmpegComponent(
|
||||||
mDecodedFrame(false),
|
mDecodedFrame(false),
|
||||||
mEndOfVideo(false)
|
mEndOfVideo(false)
|
||||||
{
|
{
|
||||||
// Get an empty texture for rendering the video.
|
|
||||||
mTexture = TextureResource::get("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoFFmpegComponent::~VideoFFmpegComponent()
|
VideoFFmpegComponent::~VideoFFmpegComponent()
|
||||||
{
|
{
|
||||||
stopVideo();
|
stopVideo();
|
||||||
mTexture.reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoFFmpegComponent::setResize(float width, float height)
|
void VideoFFmpegComponent::setResize(float width, float height)
|
||||||
|
@ -831,6 +828,9 @@ void VideoFFmpegComponent::startVideo()
|
||||||
mAudioFrameCount = 0;
|
mAudioFrameCount = 0;
|
||||||
mOutputPicture = {};
|
mOutputPicture = {};
|
||||||
|
|
||||||
|
// Get an empty texture for rendering the video.
|
||||||
|
mTexture = TextureResource::get("");
|
||||||
|
|
||||||
// This is used for the audio and video synchronization.
|
// This is used for the audio and video synchronization.
|
||||||
mTimeReference = std::chrono::high_resolution_clock::now();
|
mTimeReference = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
|
@ -983,6 +983,7 @@ void VideoFFmpegComponent::stopVideo()
|
||||||
mStartDelayed = false;
|
mStartDelayed = false;
|
||||||
mPause = false;
|
mPause = false;
|
||||||
mEndOfVideo = false;
|
mEndOfVideo = false;
|
||||||
|
mTexture.reset();
|
||||||
|
|
||||||
if (mFrameProcessingThread) {
|
if (mFrameProcessingThread) {
|
||||||
if (mWindow->getVideoPlayerCount() == 0)
|
if (mWindow->getVideoPlayerCount() == 0)
|
||||||
|
|
Loading…
Reference in a new issue