Rémi Bernon (@rbernon) commented about dlls/winegstreamer/wg_muxer.c:
GstPad *my_sink; GstCaps *my_sink_caps;
- GstAtomicQueue *output_queue;
- GstBuffer *buffer;
- GstMapInfo buffer_map;
- size_t buffer_read;
I don't think you should keep the buffer mapped across reads. If the client stops reading in the middle for some reason the buffer will stay mapped until the sink is destroyed. GStreamer doc specifically states that buffer should only be mapped for short period of times.
Also, instead of having to keep the number of bytes read here you could use `gst_buffer_resize` to update the buffer data offset after it has been partially read.