Title: [151731] trunk/Source/WebCore
Revision
151731
Author
[email protected]
Date
2013-06-19 06:22:59 -0700 (Wed, 19 Jun 2013)

Log Message

Adjust internal size on gstreamer source element when receiving data if necessary
https://bugs.webkit.org/show_bug.cgi?id=116534

Patch by Andre Moreira Magalhaes <[email protected]> on 2013-06-19
Reviewed by Philippe Normand.

If the size received in didReceiveResponse is smaller than the actual size of the received data
update the internal size and the appsrc size to the proper value.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::didReceiveData):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151730 => 151731)


--- trunk/Source/WebCore/ChangeLog	2013-06-19 13:10:21 UTC (rev 151730)
+++ trunk/Source/WebCore/ChangeLog	2013-06-19 13:22:59 UTC (rev 151731)
@@ -1,3 +1,16 @@
+2013-06-19  Andre Moreira Magalhaes   <[email protected]>
+
+        Adjust internal size on gstreamer source element when receiving data if necessary
+        https://bugs.webkit.org/show_bug.cgi?id=116534
+
+        Reviewed by Philippe Normand.
+
+        If the size received in didReceiveResponse is smaller than the actual size of the received data
+        update the internal size and the appsrc size to the proper value.
+
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        (StreamingClient::didReceiveData):
+
 2013-06-19  Víctor Manuel Jáquez Leal  <[email protected]>
 
         [GStreamer] Potential race condition when getting the video sink caps.

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp (151730 => 151731)


--- trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2013-06-19 13:10:21 UTC (rev 151730)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2013-06-19 13:22:59 UTC (rev 151731)
@@ -1011,6 +1011,12 @@
     if (priv->requestedOffset == priv->offset)
         priv->requestedOffset += length;
     priv->offset += length;
+    // priv->size == 0 if received length on didReceiveResponse < 0.
+    if (priv->size > 0 && priv->offset > priv->size) {
+        GST_DEBUG_OBJECT(m_src, "Updating internal size from %" G_GUINT64_FORMAT " to %" G_GUINT64_FORMAT, priv->size, priv->offset);
+        gst_app_src_set_size(priv->appsrc, priv->offset);
+        priv->size = priv->offset;
+    }
     GST_BUFFER_OFFSET_END(priv->buffer.get()) = priv->offset;
 
     GST_OBJECT_UNLOCK(m_src);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to