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

ao: not start AO when receiving EOF data. #13243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions audio/out/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,14 @@ static bool ao_play_data(struct ao *ao)
MP_STATS(ao, "end ao fill");

if (!p->streaming) {
MP_VERBOSE(ao, "starting AO\n");
ao->driver->start(ao);
p->streaming = true;
state.playing = true;
if (got_eof) {
MP_WARN(ao, "Error starting AO with EOF data.\n");
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this makes sense.
Where exactly is the error in this case? Since the user is informed, what can he do to resolve it?

} else {
MP_VERBOSE(ao, "starting AO\n");
ao->driver->start(ao);
p->streaming = true;
state.playing = true;
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Thinking about this further you can see that this code only runs if there are samples to play.
But if the AO is not started then the samples would be lost.

What I think might be broken is the logic that calls ao_drain or ao_reset when appropriate. (In your log it seems it is never called.)


Expand Down
Loading