Revision e356fc57 libavformat/rmdec.c

View differences:

libavformat/rmdec.c
132 132
    if (version == 3) {
133 133
        int header_size = avio_rb16(pb);
134 134
        int64_t startpos = url_ftell(pb);
135
        url_fskip(pb, 14);
135
        avio_seek(pb, 14, SEEK_CUR);
136 136
        rm_read_metadata(s, 0);
137 137
        if ((startpos + header_size) >= url_ftell(pb) + 2) {
138 138
            // fourcc (should always be "lpcJ")
......
141 141
        }
142 142
        // Skip extra header crap (this should never happen)
143 143
        if ((startpos + header_size) > url_ftell(pb))
144
            url_fskip(pb, header_size + startpos - url_ftell(pb));
144
            avio_seek(pb, header_size + startpos - url_ftell(pb), SEEK_CUR);
145 145
        st->codec->sample_rate = 8000;
146 146
        st->codec->channels = 1;
147 147
        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
......
150 150
        int flavor, sub_packet_h, coded_framesize, sub_packet_size;
151 151
        int codecdata_length;
152 152
        /* old version (4) */
153
        url_fskip(pb, 2); /* unused */
153
        avio_seek(pb, 2, SEEK_CUR); /* unused */
154 154
        avio_rb32(pb); /* .ra4 */
155 155
        avio_rb32(pb); /* data size */
156 156
        avio_rb16(pb); /* version2 */
......
321 321
skip:
322 322
    /* skip codec info */
323 323
    size = url_ftell(pb) - codec_pos;
324
    url_fskip(pb, codec_data_size - size);
324
    avio_seek(pb, codec_data_size - size, SEEK_CUR);
325 325

  
326 326
    return 0;
327 327
}
......
340 340
        size     = avio_rb32(pb);
341 341
        if (size < 20)
342 342
            return -1;
343
        url_fskip(pb, 2);
343
        avio_seek(pb, 2, SEEK_CUR);
344 344
        n_pkts   = avio_rb32(pb);
345 345
        str_id   = avio_rb16(pb);
346 346
        next_off = avio_rb32(pb);
......
353 353
            goto skip;
354 354

  
355 355
        for (n = 0; n < n_pkts; n++) {
356
            url_fskip(pb, 2);
356
            avio_seek(pb, 2, SEEK_CUR);
357 357
            pts = avio_rb32(pb);
358 358
            pos = avio_rb32(pb);
359
            url_fskip(pb, 4); /* packet no. */
359
            avio_seek(pb, 4, SEEK_CUR); /* packet no. */
360 360

  
361 361
            av_add_index_entry(st, pos, pts, 0, 0, AVINDEX_KEYFRAME);
362 362
        }
......
469 469
            goto header_end;
470 470
        default:
471 471
            /* unknown tag: skip it */
472
            url_fskip(pb, tag_size - 10);
472
            avio_seek(pb, tag_size - 10, SEEK_CUR);
473 473
            break;
474 474
        }
475 475
    }
......
529 529
            if(state == MKBETAG('I', 'N', 'D', 'X')){
530 530
                int n_pkts, expected_len;
531 531
                len = avio_rb32(pb);
532
                url_fskip(pb, 2);
532
                avio_seek(pb, 2, SEEK_CUR);
533 533
                n_pkts = avio_rb32(pb);
534 534
                expected_len = 20 + n_pkts * 14;
535 535
                if (len == 20)
......
566 566
        if (i == s->nb_streams) {
567 567
skip:
568 568
            /* skip packet if unknown number */
569
            url_fskip(pb, len);
569
            avio_seek(pb, len, SEEK_CUR);
570 570
            rm->remaining_len = 0;
571 571
            continue;
572 572
        }
......
929 929
                break;
930 930
        }
931 931

  
932
        url_fskip(s->pb, len);
932
        avio_seek(s->pb, len, SEEK_CUR);
933 933
    }
934 934
    *ppos = pos;
935 935
    return dts;

Also available in: Unified diff