packetizer: flac: recover from bad CRC (fixes #12714)
authorTristan Matthews <tmatth@videolan.org>
Sun, 16 Nov 2014 04:46:51 +0000 (23:46 -0500)
committerTristan Matthews <tmatth@videolan.org>
Sun, 16 Nov 2014 04:56:41 +0000 (23:56 -0500)
modules/packetizer/flac.c

index 3303a27..ecf854f 100644 (file)
@@ -642,6 +642,8 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
                     if (stream_crc != crc) {
                         msg_Warn(p_dec, "Bad CRC for frame size %zu: 0x%x != 0x%x",
                             p_sys->i_frame_size, crc, stream_crc);
+                        block_SkipByte(&p_sys->bytestream);
+                        p_sys->i_state = STATE_NOSYNC;
                     } else {
                         p_sys->i_state = STATE_SEND_DATA;
                         p_sys->crc = 0;