Rémi Bernon (@rbernon) commented about dlls/winegstreamer/wg_muxer.c:
+#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "winternl.h"
+#include "unix_private.h"
+struct wg_muxer +{
- GstElement *container, *muxer;
- GstPad *my_sink;
- GstAtomicQueue *output_queue;
- pthread_mutex_t mutex;
- pthread_cond_t cond;
Sorry for noticing this now but I think you should really avoid the condition variable (and perhaps not even need the mutex).
Condition variables are broken and cause random crashes on process termination (in my opinion we should completely get rid of them in winegstreamer).
Things will be simpler if the muxer works in a synchronous way, producing buffers only when samples are pushed.
Also, maybe you can delay adding the output queue until you actually use it.