Commit 6fc02a4a authored by Tristan Matthews's avatar Tristan Matthews Committed by Jean-Baptiste Kempf

packetizer: flac: recover from bad CRC (fixes #12714)

(cherry picked from commit c470b251398bc9aefa395865caf3c4c5caacf34a)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5efafe2d
...@@ -642,6 +642,8 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block) ...@@ -642,6 +642,8 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
if (stream_crc != crc) { if (stream_crc != crc) {
msg_Warn(p_dec, "Bad CRC for frame size %zu: 0x%x != 0x%x", msg_Warn(p_dec, "Bad CRC for frame size %zu: 0x%x != 0x%x",
p_sys->i_frame_size, crc, stream_crc); p_sys->i_frame_size, crc, stream_crc);
block_SkipByte(&p_sys->bytestream);
p_sys->i_state = STATE_NOSYNC;
} else { } else {
p_sys->i_state = STATE_SEND_DATA; p_sys->i_state = STATE_SEND_DATA;
p_sys->crc = 0; p_sys->crc = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment