Skip to content

libobs/graphics: Update libnsgif to 1.0.0 - #11178

Merged
RytoEX merged 3 commits into
obsproject:masterfrom
RytoEX:really-update-libnsgif
Aug 21, 2026
Merged

RytoEX merged 3 commits into
obsproject:masterfrom
RytoEX:really-update-libnsgif

Conversation

@RytoEX

@RytoEX RytoEX commented Aug 23, 2024 •

Copy link
Copy Markdown
Member

Description

Update libnsgif to from some ancient version to 1.0.0.

Motivation and Context

Wanted to attempt to update this while tackling #10993.

How Has This Been Tested?

Tested on Windows 11 with an animated GIF.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@RytoEX RytoEX added the kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. label Aug 23, 2024
@RytoEX
RytoEX requested review from Lain-B and derrod August 23, 2024 18:18
@RytoEX

RytoEX commented Aug 23, 2024

Copy link
Copy Markdown
Member Author

This could use further review, particularly on the struct changes, but generally on everything because I've never had to touch these files before.

This could also use further testing.

Comment thread libobs/cmake/os-windows.cmake Resolved
@RytoEX
RytoEX force-pushed the really-update-libnsgif branch from 3599ae1 to f42b501 Compare August 23, 2024 19:56
@RytoEX

RytoEX commented Aug 23, 2024

Copy link
Copy Markdown
Member Author

Fixing clang-format complaint, hopefully.

@Lain-B Lain-B left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to get this moved over to the deps dir but I don't think that it's a big deal for now, especially if we want to fix up issues for the next update.

@norihiro

norihiro commented Aug 25, 2024 •

Copy link
Copy Markdown
Contributor

I'd like to note that this breaks the ABI for 3rd party plugins using struct gs_image_file.

Probably, it's still safe for most cases because these conditions are satisfied.

  • The size of gs_image_file does not grow.
  • The 3rd party plugin does not access the member variables gif or later.
    Majority of 3rd party plugins just access texture, cx, cy, and loaded.

@norihiro

Copy link
Copy Markdown
Contributor

I want to suggest to hide nsgif.h from the exported header file so that the it does not require to disable some warnings and also we can update libnsgif in the future.
I made a commit on my branch. https://github.com/norihiro/obs-studio/tree/really-update-libnsgif-internal

@RytoEX

RytoEX commented Aug 26, 2024

Copy link
Copy Markdown
Member Author

cc @Lain-B and @derrod on the breaking changes concern raised by @norihiro

My initial and primary concern was working out an update to an outdated vendored dependency. If there are additional concerns, such as moving the dependency to deps/ or mitigating breaking changes, those merit attention. Unfortunately, I do not have time to address either of them. If someone is able to build upon the work here and address either of those concerns, feel free.

@RytoEX
RytoEX force-pushed the really-update-libnsgif branch 2 times, most recently from 3ed6734 to 1852a17 Compare February 7, 2025 21:34
@RytoEX

RytoEX commented Feb 7, 2025

Copy link
Copy Markdown
Member Author

Rebased and made the warning suppression more targeted.

Will probably need @Lain-B to comment on the ABI breakage concern.

@Lain-B Lain-B left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we need to break the ABI then we might as well go through with it once and for all. The proposed change seems to self-contain all future ABI breaks anyway. This should have been a pointer to an opaque type from the beginning. (Blame me for this one)

@Warchamp7
Warchamp7 force-pushed the really-update-libnsgif branch from 1852a17 to b51b825 Compare August 19, 2026 18:11
@Warchamp7

Copy link
Copy Markdown
Member

Updated this branch with norihiro and Lain's work, as well as fixed up formatting in each commit due to the clang changes between each of those commits.

@Warchamp7 Warchamp7 added the release-note/developer Groups pull request under the "Developer Notes" section in the associated patch notes label Aug 19, 2026
@RytoEX

RytoEX commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

Looks fine to me now. Might rebase and use a merge commit for this.

@RytoEX
RytoEX force-pushed the really-update-libnsgif branch from b51b825 to c3046ec Compare August 21, 2026 19:44
@RytoEX

RytoEX commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

Future todo: move libnsgif into deps/ (preferably in a subfolder that's clear it is thirdparty) or into obs-deps.

@RytoEX RytoEX moved this from Ready For Review to Ready For Merge in Current Release Tracker (33.0) Aug 21, 2026
@RytoEX
RytoEX merged commit f86e9c1 into obsproject:master Aug 21, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this from Ready For Merge to Merged in Current Release Tracker (33.0) Aug 21, 2026
@RytoEX
RytoEX deleted the really-update-libnsgif branch August 21, 2026 20:09
SirLynix added a commit to SirLynix/obs-kinect that referenced this pull request Oct 24, 2026
OBS 33 broke the plugin due to gs_image_file changes (obsproject/obs-studio#11178)
Also the plugin paths are changing (https://obsproject.com/kb/legacy-plugin-locations), which causes issues with the way backends are loaded, this should be fixed as well, hopefully it will finally improve the situation on Linux as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. release-note/developer Groups pull request under the "Developer Notes" section in the associated patch notes

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

GIFs from EmoteLab freeze every second

5 participants