Zebediah Figura : winegstreamer: Factor out free_stream().
Module: wine Branch: master Commit: 41e53a122dc036db084817f56bdd52d3d252eb16 URL: https://source.winehq.org/git/wine.git/?a=commit;h=41e53a122dc036db084817f56... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 4 20:53:41 2021 -0600 winegstreamer: Factor out free_stream(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index fdc10f72802..7b3a4fd48bd 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -2456,17 +2456,8 @@ static void source_disconnect(struct strmbase_source *iface) 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->post_sink) @@ -2488,6 +2479,18 @@ static void free_source_pin(struct parser_source *pin) pthread_cond_destroy(&stream->event_empty_cond); 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; DeleteCriticalSection(&pin->flushing_cs);
participants (1)
-
Alexandre Julliard