-
Notifications
You must be signed in to change notification settings - Fork 278
Open
Labels
Description
code for encoding here creates a new buffer called t35_buf then writes it... then clears it before it gets dropped?
Lines 3785 to 3793 in b7bf390
| for t35 in fi.t35_metadata.iter() { | |
| let mut t35_buf = Vec::new(); | |
| let mut t35_bw = BitWriter::endian(&mut t35_buf, BigEndian); | |
| t35_bw.write_t35_metadata_obu(t35).unwrap(); | |
| packet.write_all(&t35_buf).unwrap(); | |
| t35_buf.clear(); | |
| } | |
there is also the fact that this suspicously isn't writing to the packet directly but that can be for bit padding or whatever I am not too sure, but it seems pointless to clear the buffer before dropping unless the intention was to reuse said buffer if that wasn't the intention it probably would be good to implement by just pulling the buffers declaration out of the loop