mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-01-31 03:55:46 +01:00
Delete video video texture in main thread to prevent "blip" of displaying old video when highlighting a new item.
This commit is contained in:
parent
3ee6663350
commit
1131749e5d
@ -104,12 +104,6 @@ void GStreamerVideo::ProcessNewBuffer (GstElement *fakesink, GstBuffer *buf, Gst
|
||||
|
||||
if(video->Height && video->Width)
|
||||
{
|
||||
if(video->Texture && video->VideoBufferSize != map.size)
|
||||
{
|
||||
SDL_DestroyTexture(video->Texture);
|
||||
video->Texture = NULL;
|
||||
}
|
||||
|
||||
// keep the largest video buffer allocated to avoid the penalty of reallocating and deallocating
|
||||
if(!video->VideoBuffer || video->MaxVideoBufferSize < map.size)
|
||||
{
|
||||
@ -175,6 +169,13 @@ bool GStreamerVideo::Stop()
|
||||
(void)gst_element_set_state(Playbin, GST_STATE_NULL);
|
||||
}
|
||||
|
||||
if(Texture)
|
||||
{
|
||||
SDL_DestroyTexture(Texture);
|
||||
Texture = NULL;
|
||||
}
|
||||
|
||||
|
||||
// FreeElements();
|
||||
|
||||
IsPlaying = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user