Skip to content

fix: release codec wrappers and distinguish device failures - #562

Merged
devopvoid merged 1 commit into
mainfrom
fix-client-resource-and-device-errors
Nov 7, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix-client-resource-and-device-errors

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Codec preference configuration could leak owning transceiver wrappers after the first failure, device enumeration treated native platform errors as empty lists, and encoding builders accepted NaN and infinity.

  • Release every queried transceiver on failure and close receiver and track wrappers with try-with-resources.
  • Distinguish an unavailable audio backend from other native device failures through AudioBackendUnavailableException and DeviceException. Failed client queries retain their cause in MediaException; only unavailable device watching falls back to querying on each call.
  • Release the PulseAudio mainloop lock before stopping it, including initialization failure paths, to avoid hanging on an unreachable server.
  • Reject non-finite frame rates and scaling factors directly in the encoding builder, and update device API documentation.

Regression coverage includes an interrupted codec update and a fresh JVM with an unreachable PulseAudio server. The JNI build and focused regression suite pass on Linux; 399 client and wrapper tests also passed under -Xcheck:jni without fatal JNI errors before rebasing onto the current main.

Release all queried transceivers when codec configuration fails and close receiver and track wrappers on every exit. Reject non-finite encoding values in the builder.

Distinguish an unavailable audio backend from other native device failures, preserve failed queries as errors, and stop PulseAudio mainloops without holding their lock. Update device documentation and add regression coverage.
@devopvoid
devopvoid merged commit 9172f5c into main Nov 7, 2026
40 of 42 checks passed
@devopvoid
devopvoid deleted the fix-client-resource-and-device-errors branch November 7, 2026 15:59
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.

1 participant