Open SocksTheWolf opened 10 months ago
Gifs that loop do not properly tick correctly, and should be using the internal functionality of the obs image loading system. The code currently handles non-looping gifs correctly, however:
In the OBS image handling file (https://github.com/obsproject/obs-studio/blob/master/libobs/graphics/image-file.c), if gif.cur_loop is set to infinity (0xFFFF, when the gif file is loaded), then the loop will be handled internally automatically, otherwise loop_count is used in the main image structure.
gif.cur_loop
loop_count
Regardless, we should be not handling tick ourselves and instead using the OBS functionality.
The problematic lines occur in the following blocks:
https://github.com/SocksTheWolf/obs-image-reaction/blob/bd5deec78f9a393abe3b15ee3271d0a55d7f3365/src/image-reaction.c#L366
https://github.com/SocksTheWolf/obs-image-reaction/blob/bd5deec78f9a393abe3b15ee3271d0a55d7f3365/src/image-reaction.c#L392
Both of these should properly be ticking (via gs_image_file3_tick) rather than trying to update the gif the entire time.
gs_image_file3_tick
https://docs.obsproject.com/reference-libobs-graphics-image-file#c.gs_image_file_update_texture
Gifs that loop do not properly tick correctly, and should be using the internal functionality of the obs image loading system. The code currently handles non-looping gifs correctly, however:
In the OBS image handling file (https://github.com/obsproject/obs-studio/blob/master/libobs/graphics/image-file.c), if
gif.cur_loop
is set to infinity (0xFFFF, when the gif file is loaded), then the loop will be handled internally automatically, otherwiseloop_count
is used in the main image structure.Regardless, we should be not handling tick ourselves and instead using the OBS functionality.
The problematic lines occur in the following blocks:
https://github.com/SocksTheWolf/obs-image-reaction/blob/bd5deec78f9a393abe3b15ee3271d0a55d7f3365/src/image-reaction.c#L366
https://github.com/SocksTheWolf/obs-image-reaction/blob/bd5deec78f9a393abe3b15ee3271d0a55d7f3365/src/image-reaction.c#L392
Both of these should properly be ticking (via
gs_image_file3_tick
) rather than trying to update the gif the entire time.