due to the parse of the headword length , the last headword has incorrect data length ,which has
cross over many headwords.
the string(constData) will ignore the other headwords coming behind the \0 character.
Since the update to FFmpeg 5.0, when FFmpeg+libao internal player is
selected, most sounds fail to be pronounced. Furthermore, each failed
pronunciation attempt increases GoldenDict's CPU usage. Finally,
GoldenDict continues to hang and utilize the CPU cores when the user
attempts to exit it.
The reason for the issue is: GoldenDict's readAudioData() returns 0 at
EOF but FFmpeg expects the callback to return AVERROR_EOF. As a result,
internal player's threads are busy calling readAudioData() indefinitely.
a606f27f4c
documented the expected return value of the read_packet callback.
252500a78f
removed the code that handled the deprecated 0 return value gracefully.
The relevant deprecation warning
"Invalid return value 0 for stream protocol" had been flooding
GoldenDict's output for years
Fixes #1489.
One issue with the current implementation is that a wrong-cased match
remains selected when the user checks the Case Sensitive checkbox.
Another issue is that the noResults property of searchText is not
updated right away, which means that searchText's background color
remains wrong until next search.
Handle toggling case sensitivity in the same way as editing the searched
text: restart search from the beginning of the page. This improves the
Search-in-page UI consistency.