Menu

#324 Make CImageLoaderJPG thread safe

closed-fixed
None
5
2021-06-11
2021-06-10
No

Currently CImageLoaderJPG uses a global static Filename variable to store the file jpg being currently loaded by libjpeg and then uses that to report error messages from the library. This causes issues when multiple jpg images are loaded concurrently from different threads as the output messages will most of the times have the wrong filename.
This patch adds a pointer to the stringc containing the filename to the irr_jpeg_error_mgr struct and then uses that stringc as filename in the output_message function.

1 Attachments

Discussion

  • Michael Zeilfelder

    • status: open --> closed-fixed
    • assigned_to: Michael Zeilfelder
     
  • Michael Zeilfelder

    Thanks for report and patch. It's now fixed in svn trunk [r6220]

     

    Related

    Commit: [r6220]


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.