Title: [157506] trunk/Source/WebCore
Revision
157506
Author
[email protected]
Date
2013-10-16 02:18:42 -0700 (Wed, 16 Oct 2013)

Log Message

[GStreamer] video info unset if upstream doesn't query allocation
https://bugs.webkit.org/show_bug.cgi?id=122834

Reviewed by Gustavo Noronha Silva.

* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkRender): If the sink didn't process any allocation
query then use the configured source pad caps and don't rely on
invalid video info.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (157505 => 157506)


--- trunk/Source/WebCore/ChangeLog	2013-10-16 09:15:43 UTC (rev 157505)
+++ trunk/Source/WebCore/ChangeLog	2013-10-16 09:18:42 UTC (rev 157506)
@@ -1,3 +1,15 @@
+2013-10-15  Philippe Normand  <[email protected]>
+
+        [GStreamer] video info unset if upstream doesn't query allocation
+        https://bugs.webkit.org/show_bug.cgi?id=122834
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
+        (webkitVideoSinkRender): If the sink didn't process any allocation
+        query then use the configured source pad caps and don't rely on
+        invalid video info.
+
 2013-10-16  Philippe Normand  <[email protected]>
 
         [GStreamer] move Logging.h include to GStreamerUtilities.h

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp (157505 => 157506)


--- trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp	2013-10-16 09:15:43 UTC (rev 157505)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp	2013-10-16 09:18:42 UTC (rev 157506)
@@ -188,7 +188,12 @@
 
     GRefPtr<GstCaps> caps = GST_BUFFER_CAPS(buffer);
 #else
-    GRefPtr<GstCaps> caps = adoptGRef(gst_video_info_to_caps(&priv->info));
+    GRefPtr<GstCaps> caps;
+    // The video info structure is valid only if the sink handled an allocation query.
+    if (GST_VIDEO_INFO_FORMAT(&priv->info) != GST_VIDEO_FORMAT_UNKNOWN)
+        caps = adoptGRef(gst_video_info_to_caps(&priv->info));
+    else
+        caps = priv->currentCaps;
 #endif
 
     GstVideoFormat format;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to