Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix progress bar sometimes not displaying right #112

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

bakerty
Copy link
Contributor

@bakerty bakerty commented Feb 2, 2024

I've been having an issue where the progress bar is hidden and showing a value of "00:00" sometimes when opening an audio file that is longer than about 40 minutes. Sometimes it will work as expected with the same file.

As far as I can tell, it seems to be related to the threading of GstPlayMediaInfo.duration assignment in the gstreamer backend.

Reading the duration value direction from the GstPlay object seems to fix the issue without causing any problems.

@bakerty
Copy link
Contributor Author

bakerty commented Feb 3, 2024

Upon further investigation, my workaround did not actually fix the issue.

Looking through some debug output, it seems duration can be set some time after the original PlayMessage::MediaInfoUpdated message is sent, and since the app only reacts to the first such message per file, it might ignore the one announcing the correct duration value.

I've added a listener for the PlayMessage::DurationChanged message, so the progress bar range can be set once the duration value is actually assigned.

Copy link
Owner

@philn philn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that issue was bothering me as well :)

@philn philn merged commit ce1f227 into philn:master Feb 3, 2024
2 checks passed
@bakerty bakerty deleted the scale-workaround branch February 5, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants