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

Alexandre Julliard julliard at winehq.org
Sun Dec 5 12:10:04 CST 2010


Module: wine
Branch: master
Commit: c911893e43e16b29dcc0fc2d59bf6bda325671dc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c911893e43e16b29dcc0fc2d59bf6bda325671dc

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Fri Dec  3 16:06:43 2010 +0100

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

---

 dlls/winegstreamer/gstdemux.c    |    2 +-
 dlls/winegstreamer/gsttffilter.c |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 270c93a..ba96789 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -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);
diff --git a/dlls/winegstreamer/gsttffilter.c b/dlls/winegstreamer/gsttffilter.c
index b85ab43..f173fa1 100644
--- a/dlls/winegstreamer/gsttffilter.c
+++ b/dlls/winegstreamer/gsttffilter.c
@@ -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);




More information about the wine-cvs mailing list