Revision 07c02992 libavcodec/4xm.c

View differences:

libavcodec/4xm.c
27 27
#include "avcodec.h"
28 28
#include "dsputil.h"
29 29
#include "mpegvideo.h"
30
#include "bytestream.h"
30 31

  
31 32
//#undef NDEBUG
32 33
//#include <assert.h>
......
597 598
            unsigned int color[4], bits;
598 599
            memset(color, 0, sizeof(color));
599 600
//warning following is purely guessed ...
600
            color[0]= AV_RN16(buf); buf+=2; //FIXME use bytestream
601
            color[1]= AV_RN16(buf); buf+=2;
601
            color[0]= bytestream_get_le16(&buf);
602
            color[1]= bytestream_get_le16(&buf);
602 603

  
603 604
            if(color[0]&0x8000) av_log(NULL, AV_LOG_ERROR, "unk bit 1\n");
604 605
            if(color[1]&0x8000) av_log(NULL, AV_LOG_ERROR, "unk bit 2\n");
......
606 607
            color[2]= mix(color[0], color[1]);
607 608
            color[3]= mix(color[1], color[0]);
608 609

  
609
            bits= AV_RL32(buf); buf+= 4;
610
            bits= bytestream_get_le32(&buf);
610 611
            for(y2=0; y2<16; y2++){
611 612
                for(x2=0; x2<16; x2++){
612 613
                    int index= 2*(x2>>2) + 8*(y2>>2);

Also available in: Unified diff