[Webkit-unassigned] [Bug 135802] New: MediaPlayerPrivateGStreamer rounds playback rate to integer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 11 09:36:51 PDT 2014


           Summary: MediaPlayerPrivateGStreamer rounds playback rate to
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media Elements
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: fvallee at connected-labs.com
                CC: pnormand at igalia.com

tested with webkitgtk (Changeset 172150) w/ linux(64Bit)
regression seems to come from http://trac.webkit.org/changeset/163871 

The MediaPlayerPrivateGstreamer implementation is rounding (to integer) the playback rate, therefore slow motion is not working.
e.g. set playback rate to 0.5 will actually change to rate to 0.

The issue can be tested using very basic page such as :

With firefox / chromium, if we start the video then click on "Set video to play in slow motion", it will actually play slow motion (rate = 0.5)
With webkit-gtk, video is paused (even if reported playback rate is 0.5).

The issue comes from clampTo (template) function 

void MediaPlayerPrivateGStreamer::setRate(float rate)
    // Higher rate causes crash.
    rate = clampTo(rate, -20, 20);

-20, 20 are integers, therefore I guess returned value is also an integer - based on MathExtras.h
anyway clampTo(0.5, -20, 20) returns 0

The issue can be fixed using float-friendly clampTo version:
rate = clampTo(rate, -20.0, 20.0);

(clampTo(0.5, -20.0, 20.0) returns 0.5 as expected)

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list