libobs/graphics: Always load gif frame if needed

Under certain circumstances it's necessary to seek, but if the frame
isn't loaded for the position that's being seeked to, it won't update
the texture.  This just ensures the texture will update when seeking.
master
jp9000 2016-05-25 19:38:18 -07:00
parent fe62658c69
commit 0c5fd7a0fb
1 changed files with 6 additions and 5 deletions

View File

@ -318,9 +318,10 @@ void gs_image_file_update_texture(gs_image_file_t *image)
if (!image->is_animated_gif || !image->loaded)
return;
if (image->animation_frame_cache[image->cur_frame]) {
if (!image->animation_frame_cache[image->cur_frame])
decode_new_frame(image, image->cur_frame);
gs_texture_set_image(image->texture,
image->animation_frame_cache[image->cur_frame],
image->gif.width * 4, false);
}
}