Skip to content

Commit

Permalink
fix(source): HLS would not work if used directly.
Browse files Browse the repository at this point in the history
This changes HlsRequest to return true in
Compose::should_create_async.

This would otherwise cause it to be spawned on a thread without a
executor causing it to panic.

This would only cause issues if used directly since we otherwise use
Compose::create in a context where we have access to the executor.
  • Loading branch information
Erk- committed Oct 29, 2024
1 parent fe9b156 commit 04c8ff9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input/sources/hls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ impl Compose for HlsRequest {
async fn create_async(
&mut self,
) -> Result<AudioStream<Box<dyn MediaSource>>, AudioStreamError> {
Err(AudioStreamError::Unsupported)
self.create()
}

fn should_create_async(&self) -> bool {
false
true
}
}

Expand Down

0 comments on commit 04c8ff9

Please sign in to comment.