Skip to content

Commit e6989cc

Browse files
committed
Ignore extraneous bytes after SOS.
1 parent dfd4c55 commit e6989cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/decoder.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,10 @@ impl<R: Read> Decoder<R> {
519519
}
520520
}
521521

522-
let marker = huffman.take_marker(&mut self.reader)?;
522+
let mut marker = huffman.take_marker(&mut self.reader)?;
523+
while let Some(Marker::RST(_)) = marker {
524+
marker = self.read_marker().ok();
525+
}
523526

524527
if produce_data {
525528
// Retrieve all the data from the worker thread.

0 commit comments

Comments
 (0)