Revision 7f4e4321

View differences:

libavcodec/flac.c
38 38
    int bs_code, sr_code, bps_code;
39 39

  
40 40
    /* frame sync code */
41
    skip_bits(gb, 16);
41
    if ((get_bits(gb, 15) & 0x7FFF) != 0x7FFC) {
42
        av_log(avctx, AV_LOG_ERROR, "invalid sync code\n");
43
        return -1;
44
    }
45

  
46
    /* variable block size stream code */
47
    skip_bits1(gb);
42 48

  
43 49
    /* block size and sample rate codes */
44 50
    bs_code = get_bits(gb, 4);

Also available in: Unified diff