Bug 140117

Summary: [GStreamer][MSE] wrong duration computing
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED LATER    
Severity: Normal CC: cgarcia, pnormand, slomo, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
none
patch none

Description Philippe Normand 2015-01-06 02:13:40 PST
MediaSourceClientGStreamer::durationChanged() should use MediaTime::toFloat()
Comment 1 Philippe Normand 2015-01-06 02:52:43 PST
Created attachment 244044 [details]
patch
Comment 2 Sebastian Dröge (slomo) 2015-01-06 03:56:41 PST
Comment on attachment 244044 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=244044&action=review

> Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:357
> +    GstClockTime gstDuration = duration.toFloat() * GST_SECOND;

Why? What is the timeValue and timeScale for the durations here? By going through floats you'll lose some precision here
Comment 3 Philippe Normand 2015-01-06 04:03:13 PST
timeValue: 4645885228097732608 scale: 10000000
Comment 4 Philippe Normand 2015-01-06 04:04:14 PST
Duration calculated for the same video with the patch: 0:06:48.999985152
Comment 5 Sebastian Dröge (slomo) 2015-01-07 08:17:26 PST
That seems like a bug elsewhere then, or I misunderstand the API of MediaTime :)
Comment 6 Philippe Normand 2015-01-08 09:58:48 PST
Created attachment 244269 [details]
patch
Comment 7 Philippe Normand 2015-12-09 00:12:51 PST
This isn't going to apply to the reworked MSE backend.