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

winegstreamer: Make sure size is set correctly before delivering buffers.

parent 4416ef9d
......@@ -533,10 +533,10 @@ static GstFlowReturn got_data_sink(GstPad *pad, GstBuffer *buf) {
return GST_FLOW_WRONG_STATE;
}
FIXME("Did not get a GST_APP_BUFFER, creating a sample\n");
IMediaSample_SetActualDataLength(sample, GST_BUFFER_SIZE(buf));
IMediaSample_GetPointer(sample, &ptr);
memcpy(ptr, GST_BUFFER_DATA(buf), GST_BUFFER_SIZE(buf));
}
IMediaSample_SetActualDataLength(sample, GST_BUFFER_SIZE(buf));
if (GST_BUFFER_TIMESTAMP_IS_VALID(buf)) {
REFERENCE_TIME rtStart = gst_segment_to_running_time(pin->segment, GST_FORMAT_TIME, buf->timestamp);
......
......@@ -178,6 +178,7 @@ static GstFlowReturn got_data(GstPad *pad, GstBuffer *buf) {
IMediaSample_SetDiscontinuity(sample, GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DISCONT));
IMediaSample_SetPreroll(sample, GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_PREROLL));
IMediaSample_SetSyncPoint(sample, !GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DELTA_UNIT));
IMediaSample_SetActualDataLength(sample, GST_BUFFER_SIZE(buf));
hr = BaseOutputPinImpl_Deliver((BaseOutputPin*)This->tf.ppPins[1], sample);
gst_buffer_unref(buf);
......
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