Revision b7effd4e libavformat/isom.c

View differences:

libavformat/isom.c
346 346
    int len = 0;
347 347
    int count = 4;
348 348
    while (count--) {
349
        int c = get_byte(pb);
349
        int c = avio_r8(pb);
350 350
        len = (len << 7) | (c & 0x7f);
351 351
        if (!(c & 0x80))
352 352
            break;
......
357 357
int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag)
358 358
{
359 359
    int len;
360
    *tag = get_byte(pb);
360
    *tag = avio_r8(pb);
361 361
    len = ff_mp4_read_descr_len(pb);
362 362
    av_dlog(fc, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);
363 363
    return len;
......
375 375
int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb)
376 376
{
377 377
    int len, tag;
378
    int object_type_id = get_byte(pb);
379
    get_byte(pb); /* stream type */
380
    get_be24(pb); /* buffer size db */
381
    get_be32(pb); /* max bitrate */
382
    get_be32(pb); /* avg bitrate */
378
    int object_type_id = avio_r8(pb);
379
    avio_r8(pb); /* stream type */
380
    avio_rb24(pb); /* buffer size db */
381
    avio_rb32(pb); /* max bitrate */
382
    avio_rb32(pb); /* avg bitrate */
383 383

  
384 384
    st->codec->codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);
385 385
    av_dlog(fc, "esds object type id 0x%02x\n", object_type_id);
......
392 392
        st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
393 393
        if (!st->codec->extradata)
394 394
            return AVERROR(ENOMEM);
395
        get_buffer(pb, st->codec->extradata, len);
395
        avio_read(pb, st->codec->extradata, len);
396 396
        st->codec->extradata_size = len;
397 397
        if (st->codec->codec_id == CODEC_ID_AAC) {
398 398
            MPEG4AudioConfig cfg;

Also available in: Unified diff