From 472adf650962bcb4623b8c387f1479b6c5d17a3f Mon Sep 17 00:00:00 2001 From: Anton Baskanov Date: Thu, 31 Dec 2020 19:52:47 +0700 Subject: [PATCH] winegstreamer: Unmap and unref the buffer and release the sample before returning. Signed-off-by: Anton Baskanov Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/winegstreamer/gstdemux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 9114e6610a3..805a7b8c089 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -826,6 +826,9 @@ static GstFlowReturn got_data_sink(GstPad *pad, GstObject *parent, GstBuffer *bu hr = IMediaSample_SetActualDataLength(sample, info.size); if(FAILED(hr)){ + IMediaSample_Release(sample); + gst_buffer_unmap(buf, &info); + gst_buffer_unref(buf); WARN("SetActualDataLength failed: %08x\n", hr); return GST_FLOW_FLUSHING; }