winegstreamer: Unmap and unref the buffer and release the sample before returning.

Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Anton Baskanov 2020-12-31 19:52:47 +07:00 committed by Alexandre Julliard
parent 784cb2060a
commit 472adf6509
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}