mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
avio: avio_ prefixes for get_* functions
In the name of consistency: get_byte -> avio_r8 get_<type> -> avio_r<type> get_buffer -> avio_read get_partial_buffer will be made private later get_strz is left out becase I want to change it later to return something useful. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit b7effd4e8338f6ed5bda630ad7ed0809bf458648)
This commit is contained in:

committed by
Michael Niedermayer

parent
6a786b15c3
commit
e63a362857
@ -74,7 +74,7 @@ static int roq_read_header(AVFormatContext *s,
|
||||
unsigned char preamble[RoQ_CHUNK_PREAMBLE_SIZE];
|
||||
|
||||
/* get the main header */
|
||||
if (get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
|
||||
if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
|
||||
RoQ_CHUNK_PREAMBLE_SIZE)
|
||||
return AVERROR(EIO);
|
||||
framerate = AV_RL16(&preamble[6]);
|
||||
@ -115,7 +115,7 @@ static int roq_read_packet(AVFormatContext *s,
|
||||
return AVERROR(EIO);
|
||||
|
||||
/* get the next chunk preamble */
|
||||
if ((ret = get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE)) !=
|
||||
if ((ret = avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE)) !=
|
||||
RoQ_CHUNK_PREAMBLE_SIZE)
|
||||
return AVERROR(EIO);
|
||||
|
||||
@ -129,7 +129,7 @@ static int roq_read_packet(AVFormatContext *s,
|
||||
case RoQ_INFO:
|
||||
if (!roq->width || !roq->height) {
|
||||
AVStream *st = s->streams[roq->video_stream_index];
|
||||
if (get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) != RoQ_CHUNK_PREAMBLE_SIZE)
|
||||
if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) != RoQ_CHUNK_PREAMBLE_SIZE)
|
||||
return AVERROR(EIO);
|
||||
st->codec->width = roq->width = AV_RL16(preamble);
|
||||
st->codec->height = roq->height = AV_RL16(preamble + 2);
|
||||
@ -144,7 +144,7 @@ static int roq_read_packet(AVFormatContext *s,
|
||||
codebook_offset = url_ftell(pb) - RoQ_CHUNK_PREAMBLE_SIZE;
|
||||
codebook_size = chunk_size;
|
||||
url_fseek(pb, codebook_size, SEEK_CUR);
|
||||
if (get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
|
||||
if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
|
||||
RoQ_CHUNK_PREAMBLE_SIZE)
|
||||
return AVERROR(EIO);
|
||||
chunk_size = AV_RL32(&preamble[2]) + RoQ_CHUNK_PREAMBLE_SIZE * 2 +
|
||||
@ -198,7 +198,7 @@ static int roq_read_packet(AVFormatContext *s,
|
||||
}
|
||||
|
||||
pkt->pos= url_ftell(pb);
|
||||
ret = get_buffer(pb, pkt->data + RoQ_CHUNK_PREAMBLE_SIZE,
|
||||
ret = avio_read(pb, pkt->data + RoQ_CHUNK_PREAMBLE_SIZE,
|
||||
chunk_size);
|
||||
if (ret != chunk_size)
|
||||
ret = AVERROR(EIO);
|
||||
|
Reference in New Issue
Block a user