mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 20:18:28 +00:00
winegstreamer: Factor out free_stream().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
45ebc26dcf
commit
41e53a122d
1 changed files with 13 additions and 10 deletions
|
@ -2456,17 +2456,8 @@ static void source_disconnect(struct strmbase_source *iface)
|
||||||
stream->enabled = false;
|
stream->enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void free_source_pin(struct parser_source *pin)
|
static void free_stream(struct wg_parser_stream *stream)
|
||||||
{
|
{
|
||||||
struct wg_parser_stream *stream = pin->wg_stream;
|
|
||||||
|
|
||||||
if (pin->pin.pin.peer)
|
|
||||||
{
|
|
||||||
if (SUCCEEDED(IMemAllocator_Decommit(pin->pin.pAllocator)))
|
|
||||||
IPin_Disconnect(pin->pin.pin.peer);
|
|
||||||
IPin_Disconnect(&pin->pin.pin.IPin_iface);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stream->their_src)
|
if (stream->their_src)
|
||||||
{
|
{
|
||||||
if (stream->post_sink)
|
if (stream->post_sink)
|
||||||
|
@ -2488,6 +2479,18 @@ static void free_source_pin(struct parser_source *pin)
|
||||||
pthread_cond_destroy(&stream->event_empty_cond);
|
pthread_cond_destroy(&stream->event_empty_cond);
|
||||||
|
|
||||||
free(stream);
|
free(stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void free_source_pin(struct parser_source *pin)
|
||||||
|
{
|
||||||
|
if (pin->pin.pin.peer)
|
||||||
|
{
|
||||||
|
if (SUCCEEDED(IMemAllocator_Decommit(pin->pin.pAllocator)))
|
||||||
|
IPin_Disconnect(pin->pin.pin.peer);
|
||||||
|
IPin_Disconnect(&pin->pin.pin.IPin_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
free_stream(pin->wg_stream);
|
||||||
|
|
||||||
pin->flushing_cs.DebugInfo->Spare[0] = 0;
|
pin->flushing_cs.DebugInfo->Spare[0] = 0;
|
||||||
DeleteCriticalSection(&pin->flushing_cs);
|
DeleteCriticalSection(&pin->flushing_cs);
|
||||||
|
|
Loading…
Reference in a new issue