if(s->streams[0]->codec->sample_rate==4400 && !ctx->second_packet)
{
- ret = get_buffer(pb, ctx->audio_buffer, frame_size);
+ ret = avio_read(pb, ctx->audio_buffer, frame_size);
if(ret<0)
return ret;
}
else // 8000 Hz
{
- ret = get_buffer(pb, ctx->audio_buffer, frame_size);
+ ret = avio_read(pb, ctx->audio_buffer, frame_size);
if(ret<0)
return ret;
if (type == 0) { // UTF16-LE
avio_get_str16le(s->pb, len, value, 2*len + 1);
} else if (type == -1) { // ASCII
- get_buffer(s->pb, value, len);
+ avio_read(s->pb, value, len);
value[len]=0;
} else if (type > 1 && type <= 5) { // boolean or DWORD or QWORD or WORD
uint64_t num = get_value(s->pb, type);
uint64_t start_pos = url_fsize(pb) - 256;
avio_seek(pb, start_pos, SEEK_SET);
- if (get_buffer(pb, buf, sizeof(next_magic)) != sizeof(next_magic))
+ if (avio_read(pb, buf, sizeof(next_magic)) != sizeof(next_magic))
return -1;
if (memcmp(buf, next_magic, sizeof(next_magic)))
return -1;
len = get_byte(pb); \
if (len < 1 || len > size) \
return -1; \
- if (get_buffer(pb, buf, size) == size && *buf) { \
+ if (avio_read(pb, buf, size) == size && *buf) { \
buf[len] = 0; \
av_metadata_set2(&avctx->metadata, name, buf, 0); \
}
return AVERROR(ENOMEM);
st->codec->extradata[0] = fontheight;
st->codec->extradata[1] = flags;
- if (get_buffer(pb, st->codec->extradata + 2, st->codec->extradata_size - 2) < 0)
+ if (avio_read(pb, st->codec->extradata + 2, st->codec->extradata_size - 2) < 0)
return AVERROR(EIO);
if (!url_is_streamed(pb)) {
st->codec->extradata[0] = 16;
st->codec->extradata[1] = BINTEXT_PALETTE|BINTEXT_FONT;
- if (get_buffer(pb, st->codec->extradata + 2, 24) < 0)
+ if (avio_read(pb, st->codec->extradata + 2, 24) < 0)
return AVERROR(EIO);
url_fskip(pb, 144);
- if (get_buffer(pb, st->codec->extradata + 2 + 24, 24) < 0)
+ if (avio_read(pb, st->codec->extradata + 2 + 24, 24) < 0)
return AVERROR(EIO);
- if (get_buffer(pb, st->codec->extradata + 2 + 48, 4096) < 0)
+ if (avio_read(pb, st->codec->extradata + 2 + 48, 4096) < 0)
return AVERROR(EIO);
if (!url_is_streamed(pb)) {
avio_seek(pb, avio_size(pb) - 4096 - 48, SEEK_SET);
- if (get_buffer(pb, st->codec->extradata + 2 + 48, 4096) < 0)
+ if (avio_read(pb, st->codec->extradata + 2 + 48, 4096) < 0)
return AVERROR(EIO);
- if (get_buffer(pb, st->codec->extradata + 2, 48) < 0)
+ if (avio_read(pb, st->codec->extradata + 2, 48) < 0)
return AVERROR(EIO);
bin->fsize = url_fsize(pb) - 12 - 4096 - 48;