Revision b7effd4e libavformat/bfi.c

View differences:

libavformat/bfi.c
66 66

  
67 67
    /* Set the total number of frames. */
68 68
    url_fskip(pb, 8);
69
    chunk_header           = get_le32(pb);
70
    bfi->nframes           = get_le32(pb);
71
    get_le32(pb);
72
    get_le32(pb);
73
    get_le32(pb);
74
    fps                    = get_le32(pb);
69
    chunk_header           = avio_rl32(pb);
70
    bfi->nframes           = avio_rl32(pb);
71
    avio_rl32(pb);
72
    avio_rl32(pb);
73
    avio_rl32(pb);
74
    fps                    = avio_rl32(pb);
75 75
    url_fskip(pb, 12);
76
    vstream->codec->width  = get_le32(pb);
77
    vstream->codec->height = get_le32(pb);
76
    vstream->codec->width  = avio_rl32(pb);
77
    vstream->codec->height = avio_rl32(pb);
78 78

  
79 79
    /*Load the palette to extradata */
80 80
    url_fskip(pb, 8);
81 81
    vstream->codec->extradata      = av_malloc(768);
82 82
    vstream->codec->extradata_size = 768;
83
    get_buffer(pb, vstream->codec->extradata,
83
    avio_read(pb, vstream->codec->extradata,
84 84
               vstream->codec->extradata_size);
85 85

  
86
    astream->codec->sample_rate = get_le32(pb);
86
    astream->codec->sample_rate = avio_rl32(pb);
87 87

  
88 88
    /* Set up the video codec... */
89 89
    av_set_pts_info(vstream, 32, 1, fps);
......
119 119
        while(state != MKTAG('S','A','V','I')){
120 120
            if (url_feof(pb))
121 121
                return AVERROR(EIO);
122
            state = 256*state + get_byte(pb);
122
            state = 256*state + avio_r8(pb);
123 123
        }
124 124
        /* Now that the chunk's location is confirmed, we proceed... */
125
        chunk_size      = get_le32(pb);
126
        get_le32(pb);
127
        audio_offset    = get_le32(pb);
128
        get_le32(pb);
129
        video_offset    = get_le32(pb);
125
        chunk_size      = avio_rl32(pb);
126
        avio_rl32(pb);
127
        audio_offset    = avio_rl32(pb);
128
        avio_rl32(pb);
129
        video_offset    = avio_rl32(pb);
130 130
        audio_size      = video_offset - audio_offset;
131 131
        bfi->video_size = chunk_size - video_offset;
132 132

  

Also available in: Unified diff