Revision b7effd4e libavformat/apc.c

View differences:

libavformat/apc.c
35 35
    AVIOContext *pb = s->pb;
36 36
    AVStream *st;
37 37

  
38
    get_le32(pb); /* CRYO */
39
    get_le32(pb); /* _APC */
40
    get_le32(pb); /* 1.20 */
38
    avio_rl32(pb); /* CRYO */
39
    avio_rl32(pb); /* _APC */
40
    avio_rl32(pb); /* 1.20 */
41 41

  
42 42
    st = av_new_stream(s, 0);
43 43
    if (!st)
......
46 46
    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
47 47
    st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;
48 48

  
49
    get_le32(pb); /* number of samples */
50
    st->codec->sample_rate = get_le32(pb);
49
    avio_rl32(pb); /* number of samples */
50
    st->codec->sample_rate = avio_rl32(pb);
51 51

  
52 52
    st->codec->extradata_size = 2 * 4;
53 53
    st->codec->extradata = av_malloc(st->codec->extradata_size +
......
56 56
        return AVERROR(ENOMEM);
57 57

  
58 58
    /* initial predictor values for adpcm decoder */
59
    get_buffer(pb, st->codec->extradata, 2 * 4);
59
    avio_read(pb, st->codec->extradata, 2 * 4);
60 60

  
61 61
    st->codec->channels = 1;
62
    if (get_le32(pb))
62
    if (avio_rl32(pb))
63 63
        st->codec->channels = 2;
64 64

  
65 65
    st->codec->bits_per_coded_sample = 4;

Also available in: Unified diff