Skip to content

SoundSource.cpp: return AVERROR_EOF when buffer is empty#747

Closed
Lihis wants to merge 1 commit intorwengine:mainfrom
Lihis:fix-new-game-hang
Closed

SoundSource.cpp: return AVERROR_EOF when buffer is empty#747
Lihis wants to merge 1 commit intorwengine:mainfrom
Lihis:fix-new-game-hang

Conversation

@Lihis
Copy link
Copy Markdown
Collaborator

@Lihis Lihis commented Dec 1, 2023

On latest master (0f83c16) when I click "start new game", nothing happens.

Debugged this a bit it seems the avformat_find_stream_info hangs in SoundSource.cpp. Looks like the read_packet function is called over and over again even the functions returns 0.

But if AVERROR_EOF is returned when the buffer is empty, it fixes the hanging for me. Is this related some API change or something else? Would need to figure it out..

@okias
Copy link
Copy Markdown
Contributor

okias commented Nov 26, 2024

Reviewed-by: David Heidelberg <david@ixit.cz>

@tsjost
Copy link
Copy Markdown
Member

tsjost commented Jan 5, 2025

Thanks for the fix, Start new game is now working again!

@tsjost
Copy link
Copy Markdown
Member

tsjost commented Jan 5, 2025

(github is broken and doesn't detect the merge, so closing manually)

@tsjost tsjost closed this Jan 5, 2025
@Lihis Lihis deleted the fix-new-game-hang branch January 9, 2025 10:17
@Lihis
Copy link
Copy Markdown
Collaborator Author

Lihis commented Jan 9, 2025

Merge commit e20356b

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.

3 participants