History

avio: rename av_alloc_put_byte -> avio_alloc_context for consistency

Anton Khirnov committed 15 years ago

Commit 90ed2771 parent 34bb0575 files · +26 −5Browse files

Unified · Split

5 files
  1. libavformat/avidec.c +1 −1
  2. libavformat/avio.h +10 −1
  3. libavformat/aviobuf.c +13 −1
  4. libavformat/rdt.c +1 −1
  5. libavformat/wtv.c +1 −1
libavformat/avidec.c+1−1
@@ -752,7 +752,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) { · 751 unmodified lines
752752 AVIStream *ast = st->priv_data;
753753 AVInputFormat *sub_demuxer;
754754 AVRational time_base;
755− AVIOContext *pb = av_alloc_put_byte(pkt->data + 7,
755+ AVIOContext *pb = avio_alloc_context( pkt->data + 7,
756756 pkt->size - 7,
757757 0, NULL, NULL, NULL, NULL);
758758 AVProbeData pd;
libavformat/avio.h+10−1
@@ -370,8 +370,17 @@ attribute_deprecated int init_put_byte(AVIOContext *s, · 369 unmodified lines
370370 int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
371371 int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
372372 int64_t (*seek)(void *opaque, int64_t offset, int whence));
373+attribute_deprecated AVIOContext *av_alloc_put_byte(
374+ unsigned char *buffer,
375+ int buffer_size,
376+ int write_flag,
377+ void *opaque,
378+ int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
379+ int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
380+ int64_t (*seek)(void *opaque, int64_t offset, int whence));
373381 #endif
374−AVIOContext *av_alloc_put_byte(
382+
383+AVIOContext *avio_alloc_context(
375384 unsigned char *buffer,
376385 int buffer_size,
377386 int write_flag,
libavformat/aviobuf.c+13−1
@@ -87,9 +87,21 @@ int init_put_byte(AVIOContext *s, · 86 unmodified lines
8787 return ffio_init_context(s, buffer, buffer_size, write_flag, opaque,
8888 read_packet, write_packet, seek);
8989 }
90+AVIOContext *av_alloc_put_byte(
91+ unsigned char *buffer,
92+ int buffer_size,
93+ int write_flag,
94+ void *opaque,
95+ int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
96+ int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
97+ int64_t (*seek)(void *opaque, int64_t offset, int whence))
98+{
99+ return avio_alloc_context(buffer, buffer_size, write_flag, opaque,
100+ read_packet, write_packet, seek);
101+}
90102 #endif
91103
92−AVIOContext *av_alloc_put_byte(
104+AVIOContext *avio_alloc_context(
93105 unsigned char *buffer,
94106 int buffer_size,
95107 int write_flag,
libavformat/rdt.c+1−1
@@ -311,7 +311,7 @@ rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st, · 310 unmodified lines
311311 if (res > 0) {
312312 if (st->codec->codec_id == CODEC_ID_AAC) {
313313 memcpy (rdt->buffer, buf + pos, len - pos);
314− rdt->rmctx->pb = av_alloc_put_byte (rdt->buffer, len - pos, 0,
314+ rdt->rmctx->pb = avio_alloc_context (rdt->buffer, len - pos, 0,
315315 NULL, NULL, NULL, NULL);
316316 }
317317 goto get_cache;
libavformat/wtv.c+1−1
@@ -236,7 +236,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int · 235 unmodified lines
236236 return NULL;
237237 }
238238
239− pb = av_alloc_put_byte(buffer, 1 << wf->sector_bits, 0, wf,
239+ pb = avio_alloc_context(buffer, 1 << wf->sector_bits, 0, wf,
240240 wtvfile_read_packet, NULL, wtvfile_seek);
241241 if (!pb) {
242242 av_free(buffer);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t