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

Short Audio played while seeking on paused player. #578

Closed
snsg8 opened this issue Feb 20, 2016 · 1 comment
Closed

Short Audio played while seeking on paused player. #578

snsg8 opened this issue Feb 20, 2016 · 1 comment
Assignees
Milestone

Comments

@snsg8
Copy link

snsg8 commented Feb 20, 2016

To replicate this issue in player.exe, hit pause button and keep seeking.
This may not a bug, but it"s a bit annoying for users.

In my program, I tried to mute/ zero volume the audio before seeking by calling:

AVPlayer::audio() -> setMute(true)

Then I catch seekFinished(qint64 pos) signal to re-enable the audio but a short audio still played. I also added AVPlayer::audio() -> flush(); AVPlayer::audio() -> clear() to make sure audio buffer is clear but it won"t help.
I guess, when seekFinished is emitted, the video thread has finished seeking while audio thread hasn"t.

Let me know if you have any idea. Thanks

@wang-bin wang-bin added the bug label Feb 20, 2016
@wang-bin wang-bin added this to the 1.10 milestone Feb 20, 2016
@wang-bin wang-bin self-assigned this Feb 20, 2016
@wang-bin wang-bin added the audio label Feb 20, 2016
@snsg8
Copy link
Author

snsg8 commented Jul 6, 2016

On 1.11 , this problem seem to be solved on Mac but on Windows a short audio still played.

wang-bin added a commit that referenced this issue Jul 27, 2016
when playback is paused, ao still gets 1 frame audio data after seek, so
short audio will be played. the simplest solution is set ao to paused
state, and ignore the incoming data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants