winegstreamer: Make sure size is set correctly before delivering buffers.
This commit is contained in:
parent
4416ef9de6
commit
c911893e43
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue