Commit d62b4dcb authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

winegstreamer: Fix buffer leak in error path.

parent 10c51a80
......@@ -517,10 +517,12 @@ static GstFlowReturn got_data_sink(GstPad *pad, GstBuffer *buf) {
} else {
BYTE *ptr = NULL;
hr = BaseOutputPinImpl_GetDeliveryBuffer(&pin->pin, &sample, NULL, NULL, 0);
freeSamp = TRUE;
if (hr == VFW_E_NOT_CONNECTED)
if (hr == VFW_E_NOT_CONNECTED) {
gst_buffer_unref(buf);
return GST_FLOW_NOT_LINKED;
}
if (FAILED(hr)) {
gst_buffer_unref(buf);
ERR("Didn't get a GST_APP_BUFFER, and could not get a delivery buffer (%x), returning GST_FLOW_WRONG_STATE\n", hr);
return GST_FLOW_WRONG_STATE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment