Revision 0fe04628

View differences:

libavcodec/imc.c
41 41

  
42 42
#include "imcdata.h"
43 43

  
44
#define IMC_BLOCK_SIZE 64
44 45
#define IMC_FRAME_ID 0x21
45 46
#define BANDS 32
46 47
#define COEFFS 256
......
637 638
    int counter, bitscount;
638 639
    uint16_t *buf16 = (uint16_t *) buf;
639 640

  
640
    /* FIXME: input should not be modified */
641
    for(i = 0; i < FFMIN(buf_size, avctx->block_align) / 2; i++)
641
    for(i = 0; i < IMC_BLOCK_SIZE / 2; i++)
642 642
        buf16[i] = bswap_16(buf16[i]);
643 643

  
644
    init_get_bits(&q->gb, buf, 512);
644
    init_get_bits(&q->gb, buf, IMC_BLOCK_SIZE * 8);
645 645

  
646 646
    /* Check the frame header */
647 647
    imc_hdr = get_bits(&q->gb, 9);
......
788 788

  
789 789
    *data_size = COEFFS * sizeof(int16_t);
790 790

  
791
    return avctx->block_align;
791
    return IMC_BLOCK_SIZE;
792 792
}
793 793

  
794 794

  

Also available in: Unified diff