[GStreamer] MediaPlayerPrivateGStreamer::totalBytes() does not work reliably
https://bugs.webkit.org/show_bug.cgi?id=51926
Reviewed by Kenneth Rohde Christiansen, Gustavo Noronha Silva
Work around potential upstream bug: Querying a GstBin for the duration,
will forward the query to all sink children. Our WebKitWebSrc however
is a bin with only source children, therefore the query fails. Until
this is changed upstream, this patch works around it as follows,
based on suggestion by Philippe Normand and Sebastian Dröge:
When the initial query fails, attempt the same query on all source
pads and take the maximum length reported.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::totalBytes):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2 files changed