Revision b7effd4e libavformat/spdifdec.c

View differences:

libavformat/spdifdec.c
170 170
    int pkt_size_bits, offset, ret;
171 171

  
172 172
    while (state != (AV_BSWAP16C(SYNCWORD1) << 16 | AV_BSWAP16C(SYNCWORD2))) {
173
        state = (state << 8) | get_byte(pb);
173
        state = (state << 8) | avio_r8(pb);
174 174
        if (url_feof(pb))
175 175
            return AVERROR_EOF;
176 176
    }
177 177

  
178
    data_type = get_le16(pb);
179
    pkt_size_bits = get_le16(pb);
178
    data_type = avio_rl16(pb);
179
    pkt_size_bits = avio_rl16(pb);
180 180

  
181 181
    if (pkt_size_bits % 16)
182 182
        av_log_ask_for_sample(s, "Packet does not end to a 16-bit boundary.");
......
187 187

  
188 188
    pkt->pos = url_ftell(pb) - BURST_HEADER_SIZE;
189 189

  
190
    if (get_buffer(pb, pkt->data, pkt->size) < pkt->size) {
190
    if (avio_read(pb, pkt->data, pkt->size) < pkt->size) {
191 191
        av_free_packet(pkt);
192 192
        return AVERROR_EOF;
193 193
    }

Also available in: Unified diff