Zebediah Figura (@zfigura) commented about dlls/winegstreamer/media_source.c:
struct media_source *source = stream->parent_source; PROPVARIANT empty_var = {.vt = VT_EMPTY}; struct wg_parser_buffer buffer;
bool res;
TRACE("%p, %p\n", stream, token);
- if (wg_parser_stream_get_buffer(source->wg_parser, stream->wg_stream, &buffer))
- LeaveCriticalSection(&source->cs);
- res = wg_parser_stream_get_buffer(source->wg_parser, stream->wg_stream, &buffer);
- EnterCriticalSection(&source->cs);
This is suspicious. Why do we need this?
Note also that this isn't thread-safe either; as soon as we drop the critical section we can already have been shut down.