Skip to content

Commit

Permalink
Do not consume VariantSegment when calling VariantSegment::write_to
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed Dec 9, 2023
1 parent b0338b2 commit 355c839
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/media/streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@ impl VariantSegment {
}

/// Write this segment to a writer.
pub async fn write_to(self, w: &mut impl Write) -> Result<()> {
let mut segment = self.executor.get(self.url).request_raw().await?;
pub async fn write_to(&self, w: &mut impl Write) -> Result<()> {
let mut segment = self.executor.get(&self.url).request_raw().await?;

w.write(VariantSegment::decrypt(
segment.borrow_mut(),
Expand Down

0 comments on commit 355c839

Please sign in to comment.