Revision b7effd4e libavformat/mpc8.c

View differences:

libavformat/mpc8.c
121 121
{
122 122
    int64_t pos;
123 123
    pos = url_ftell(pb);
124
    *tag = get_le16(pb);
124
    *tag = avio_rl16(pb);
125 125
    *size = ff_get_v(pb);
126 126
    *size -= url_ftell(pb) - pos;
127 127
}
......
143 143
    }
144 144
    if(!(buf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE)))
145 145
        return;
146
    get_buffer(s->pb, buf, size);
146
    avio_read(s->pb, buf, size);
147 147
    init_get_bits(&gb, buf, size * 8);
148 148
    size = gb_get_v(&gb);
149 149
    if(size > UINT_MAX/4 || size > c->samples/1152){
......
195 195
    int64_t size, pos;
196 196

  
197 197
    c->header_pos = url_ftell(pb);
198
    if(get_le32(pb) != TAG_MPCK){
198
    if(avio_rl32(pb) != TAG_MPCK){
199 199
        av_log(s, AV_LOG_ERROR, "Not a Musepack8 file\n");
200 200
        return -1;
201 201
    }
......
213 213
    }
214 214
    pos = url_ftell(pb);
215 215
    url_fskip(pb, 4); //CRC
216
    c->ver = get_byte(pb);
216
    c->ver = avio_r8(pb);
217 217
    if(c->ver != 8){
218 218
        av_log(s, AV_LOG_ERROR, "Unknown stream version %d\n", c->ver);
219 219
        return -1;
......
230 230

  
231 231
    st->codec->extradata_size = 2;
232 232
    st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
233
    get_buffer(pb, st->codec->extradata, st->codec->extradata_size);
233
    avio_read(pb, st->codec->extradata, st->codec->extradata_size);
234 234

  
235 235
    st->codec->channels = (st->codec->extradata[1] >> 4) + 1;
236 236
    st->codec->sample_rate = mpc8_rate[st->codec->extradata[0] >> 5];

Also available in: Unified diff