Bug 397591 - seeking a player past 33m22s resets seek bar to 00:00
Summary: seeking a player past 33m22s resets seek bar to 00:00
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Media Player (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: arsenarsentmc
URL:
Keywords:
: 368707 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-08-18 16:06 UTC by Alexander Terry
Modified: 2018-09-16 01:19 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.12.7


Attachments
Changing the position to a double the same way the length was changed to a double fixes the media player (720 bytes, patch)
2018-09-05 09:05 UTC, arsenarsentmc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Terry 2018-08-18 16:06:09 UTC
repro steps: open a media file that is at least 35 minutes long
seek the media file (using the player you opened it with) to past 33:20
observe the seek bar in mediacontroller.

this is most likely caused by QML's limit of 2000000000 length for ints, and mpris's use of very precise positions.
Comment 1 Christoph Feck 2018-09-05 03:45:54 UTC

*** This bug has been marked as a duplicate of bug 377623 ***
Comment 2 arsenarsentmc 2018-09-05 06:21:58 UTC
While this is technically a duplicate issue, the resolution of #377623 did not cover the position, which is what this issue is about. I'd like to provide new reproduction steps though:
1) Open a file in a media player and seek it to 34 minutes
2) Try to seek the file using the Plasma media player
3) The media player seek bar resets to 00:00
I've also found that pushing past the point of 36 minutes seems to reset the Plasma media player back to 00:00
Comment 3 arsenarsentmc 2018-09-05 09:05:43 UTC
Created attachment 114791 [details]
Changing the position to a double the same way the length was changed to a double fixes the media player
Comment 4 Christoph Feck 2018-09-05 23:53:10 UTC
Thanks for the investigation. Is the patch from comment #3 the correct diff, or the reverse diff going from the fixed version to the current version?
Comment 5 arsenarsentmc 2018-09-06 07:19:22 UTC
It is in reverse, my bad. I wrote it in a hurry and ended up swapping the operands.
Comment 6 Kai Uwe Broulik 2018-09-06 07:39:43 UTC
Thanks for your patch! Indeed changing the property to double should fix this since we had a similar overflow issue with the "Length" property that was also changed to a double. Can you please upload that patch to Phabricator [1] for review, as patches on the bug tracker often get overlooked? You'll find more information on our wiki [2]. Thanks!

[1] https://phabricator.kde.org/
[2] https://community.kde.org/Get_Involved/development
Comment 7 arsenarsentmc 2018-09-06 08:14:35 UTC
Done.
https://phabricator.kde.org/D15311
Comment 8 Kai Uwe Broulik 2018-09-06 08:30:21 UTC
Git commit 1bb02b98cfedfd6b51ac8de0c34a5778659433f7 by Kai Uwe Broulik, on behalf of Arsen Arsen.
Committed on 06/09/2018 at 08:29.
Pushed by broulik into branch 'Plasma/5.12'.

[Media Player] Change int to double for positions

In previous versions of Plasma, media player had an overflow bug in positions, leading to the player resetting to 00:00.
This only affects files longer than around 33 minutes 20 seconds.
FIXED-IN: 5.12.7

Differential Revision: https://phabricator.kde.org/D15311

M  +1    -1    applets/mediacontroller/contents/ui/ExpandedRepresentation.qml

https://commits.kde.org/plasma-workspace/1bb02b98cfedfd6b51ac8de0c34a5778659433f7
Comment 9 Patrick Silva 2018-09-16 01:19:57 UTC
*** Bug 368707 has been marked as a duplicate of this bug. ***