Revision e63a3628 libavformat/idroqdec.c

View differences:

libavformat/idroqdec.c
74 74
    unsigned char preamble[RoQ_CHUNK_PREAMBLE_SIZE];
75 75

  
76 76
    /* get the main header */
77
    if (get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
77
    if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
78 78
        RoQ_CHUNK_PREAMBLE_SIZE)
79 79
        return AVERROR(EIO);
80 80
    framerate = AV_RL16(&preamble[6]);
......
115 115
            return AVERROR(EIO);
116 116

  
117 117
        /* get the next chunk preamble */
118
        if ((ret = get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE)) !=
118
        if ((ret = avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE)) !=
119 119
            RoQ_CHUNK_PREAMBLE_SIZE)
120 120
            return AVERROR(EIO);
121 121

  
......
129 129
        case RoQ_INFO:
130 130
            if (!roq->width || !roq->height) {
131 131
                AVStream *st = s->streams[roq->video_stream_index];
132
                if (get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) != RoQ_CHUNK_PREAMBLE_SIZE)
132
                if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) != RoQ_CHUNK_PREAMBLE_SIZE)
133 133
                    return AVERROR(EIO);
134 134
                st->codec->width  = roq->width  = AV_RL16(preamble);
135 135
                st->codec->height = roq->height = AV_RL16(preamble + 2);
......
144 144
            codebook_offset = url_ftell(pb) - RoQ_CHUNK_PREAMBLE_SIZE;
145 145
            codebook_size = chunk_size;
146 146
            url_fseek(pb, codebook_size, SEEK_CUR);
147
            if (get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
147
            if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
148 148
                RoQ_CHUNK_PREAMBLE_SIZE)
149 149
                return AVERROR(EIO);
150 150
            chunk_size = AV_RL32(&preamble[2]) + RoQ_CHUNK_PREAMBLE_SIZE * 2 +
......
198 198
            }
199 199

  
200 200
            pkt->pos= url_ftell(pb);
201
            ret = get_buffer(pb, pkt->data + RoQ_CHUNK_PREAMBLE_SIZE,
201
            ret = avio_read(pb, pkt->data + RoQ_CHUNK_PREAMBLE_SIZE,
202 202
                chunk_size);
203 203
            if (ret != chunk_size)
204 204
                ret = AVERROR(EIO);

Also available in: Unified diff