Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#401 Mutex in APIs of Stream Decoder

1.3.0
open-works-for-me
Erik
None
5
2014-03-21
2013-08-31
Leo
No

Why do APIs in stream_decoder.c not have any mutex protection?

I use APIs to decode FLAC stream in two different tasks, one is a continuous routine to push raw data into the process API, the other is external I/O routine to invoke init or delete APIs when I switch to another stream. The program always crashes in the libFLAC in switch operation and later on I realize there's no mutex in the APIs of the libFLAC when I download the source with version 1.3.0. Therefore I have to make some effort to write my own mutex for this issue.

In my option a stable & strong library should have fundamental synchronization protection mechanism in APIs especially in some external I/O routine application. Would you please to realize it?

Discussion

  • Erik
    Erik
    2014-03-21

    • status: open --> open-works-for-me
     
  • Erik
    Erik
    2014-03-21

    From: https://xiph.org/flac/api/

    libFLAC usually only requires the standard C library and C math library. In particular, threading is not used so there is no dependency on a thread library. However, libFLAC does not use global variables and should be thread-safe.

    If you still think libFLAC is not thread safe you should either show where libFLAC uses mutable global data or provide a small demo program showing the need for synchronisation.

    Will close this in a month's time if there is no response.

     
  • Erik
    Erik
    2014-03-21

    • assigned_to: Josh Coalson --> Erik