Skip to content

Commit

Permalink
FIX: video_stop
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Feb 23, 2024
1 parent c1143fb commit a537633
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Engine/media/video/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,10 @@ void video_stop(int sprite_num)
if (it == gl_VideoObjects.end())
return; // wrong index

int sprite_slot = it->first;
int video_slot = it->second;
video_core_slot_stop(video_slot);
gl_VideoObjects.erase(video_slot);
gl_VideoObjects.erase(sprite_slot);

if (gl_VideoObjects.empty())
video_core_shutdown(); // stop the thread to avoid redundant processing
Expand Down

0 comments on commit a537633

Please sign in to comment.