Fix bug where decoder state was not correctly reset on packets with no MCU offset

pull/4/head
Philip Heron 2018-06-27 08:52:46 +01:00
rodzic 5c7dde620c
commit 94db83a707
1 zmienionych plików z 6 dodań i 0 usunięć

6
ssdv.c
Wyświetl plik

@ -1337,6 +1337,12 @@ char ssdv_dec_feed(ssdv_t *s, uint8_t *packet)
s->packet_id = packet_id;
}
/* Clear the work area if there is no overlap from previous packet */
if(s->packet_mcu_offset == 0)
{
s->workbits = s->worklen = 0;
}
/* Feed the JPEG data into the processor */
for(; i < s->pkt_size_payload; i++)
{