Skip to content

Commit

Permalink
Don't error out if we've missed the first packet
Browse files Browse the repository at this point in the history
  • Loading branch information
zanshi committed Jan 29, 2024
1 parent 07caa72 commit f32192d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codec/jpeg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,9 @@ impl Depacketizer {
let _ = self.metadata.take();
self.data.clear();

return Err("Got JPEG fragment when we have no header".to_string());
// This can happen if we somehow drop the first packet in a frame
log::debug!("Got JPEG fragment when we have no header");
return Ok(());
}

payload.advance(8);
Expand Down

0 comments on commit f32192d

Please sign in to comment.