Bug 140117 - [GStreamer][MSE] wrong duration computing
Summary: [GStreamer][MSE] wrong duration computing
Status: RESOLVED LATER
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-06 02:13 PST by Philippe Normand
Modified: 2015-12-09 00:12 PST (History)
4 users (show)

See Also:


Attachments
patch (2.12 KB, patch)
2015-01-06 02:52 PST, Philippe Normand
no flags Details | Formatted Diff | Diff
patch (2.31 KB, patch)
2015-01-08 09:58 PST, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.