Commit 2a2ed455 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winegstreamer: Only warn on wg_transform input buffer push errors.

Some GStreamer plugins such as openh264 return spurious errors when running the tests. They pass the tests successfull if we simply ignore them. It does not make much difference with returning the error, as they are not supposed to happen anyway, and most of the time the MFT clients don't expect or handle errors.
parent 0c760ef7
......@@ -740,30 +740,25 @@ static NTSTATUS read_transform_output_data(GstBuffer *buffer, GstCaps *caps, gsi
static bool get_transform_output(struct wg_transform *transform, struct wg_sample *sample)
{
GstFlowReturn ret = GST_FLOW_OK;
GstBuffer *input_buffer;
GstFlowReturn ret;
/* Provide the sample for transform_request_sample to pick it up */
InterlockedIncrement(&sample->refcount);
InterlockedExchangePointer((void **)&transform->output_wg_sample, sample);
while (!(transform->output_sample = gst_atomic_queue_pop(transform->output_queue)))
while (!(transform->output_sample = gst_atomic_queue_pop(transform->output_queue))
&& (input_buffer = gst_atomic_queue_pop(transform->input_queue)))
{
if (!(input_buffer = gst_atomic_queue_pop(transform->input_queue)))
break;
if ((ret = gst_pad_push(transform->my_src, input_buffer)))
{
GST_ERROR("Failed to push transform input, error %d", ret);
break;
}
GST_WARNING("Failed to push transform input, error %d", ret);
}
/* Remove the sample so transform_request_sample cannot use it */
if (InterlockedExchangePointer((void **)&transform->output_wg_sample, NULL))
InterlockedDecrement(&sample->refcount);
return ret == GST_FLOW_OK;
return !!transform->output_sample;
}
NTSTATUS wg_transform_read_data(void *args)
......@@ -779,12 +774,6 @@ NTSTATUS wg_transform_read_data(void *args)
if (!transform->output_sample && !get_transform_output(transform, sample))
{
wg_allocator_release_sample(transform->allocator, sample, false);
return STATUS_UNSUCCESSFUL;
}
if (!transform->output_sample)
{
sample->size = 0;
params->result = MF_E_TRANSFORM_NEED_MORE_INPUT;
GST_INFO("Cannot read %u bytes, no output available", sample->max_size);
......
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