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
752 AVIStream *ast = st->priv_data;752 AVIStream *ast = st->priv_data;
753 AVInputFormat *sub_demuxer;753 AVInputFormat *sub_demuxer;
754 AVRational time_base;754 AVRational time_base;
755 AVIOContext *pb = av_alloc_put_byte(pkt->data + 7,755 AVIOContext *pb = avio_alloc_context( pkt->data + 7,
756 pkt->size - 7,756 pkt->size - 7,
757 0, NULL, NULL, NULL, NULL);757 0, NULL, NULL, NULL, NULL);
758 AVProbeData pd;758 AVProbeData pd;
libavformat/avio.h+10−1
@@ -370,8 +370,17 @@ attribute_deprecated int init_put_byte(AVIOContext *s, · 369 unmodified lines
370 int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),370 int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
371 int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),371 int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
372 int64_t (*seek)(void *opaque, int64_t offset, int whence));372 int64_t (*seek)(void *opaque, int64_t offset, int whence));
373attribute_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));
373#endif381#endif
374AVIOContext *av_alloc_put_byte(382
383AVIOContext *avio_alloc_context(
375 unsigned char *buffer,384 unsigned char *buffer,
376 int buffer_size,385 int buffer_size,
377 int write_flag,386 int write_flag,
libavformat/aviobuf.c+13−1
@@ -87,9 +87,21 @@ int init_put_byte(AVIOContext *s, · 86 unmodified lines
87 return ffio_init_context(s, buffer, buffer_size, write_flag, opaque,87 return ffio_init_context(s, buffer, buffer_size, write_flag, opaque,
88 read_packet, write_packet, seek);88 read_packet, write_packet, seek);
89}89}
90AVIOContext *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}
90#endif102#endif
91 103
92AVIOContext *av_alloc_put_byte(104AVIOContext *avio_alloc_context(
93 unsigned char *buffer,105 unsigned char *buffer,
94 int buffer_size,106 int buffer_size,
95 int write_flag,107 int write_flag,
libavformat/rdt.c+1−1
@@ -311,7 +311,7 @@ rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st, · 310 unmodified lines
311 if (res > 0) {311 if (res > 0) {
312 if (st->codec->codec_id == CODEC_ID_AAC) {312 if (st->codec->codec_id == CODEC_ID_AAC) {
313 memcpy (rdt->buffer, buf + pos, len - pos);313 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,
315 NULL, NULL, NULL, NULL);315 NULL, NULL, NULL, NULL);
316 }316 }
317 goto get_cache;317 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
236 return NULL;236 return NULL;
237 }237 }
238 238
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,
240 wtvfile_read_packet, NULL, wtvfile_seek);240 wtvfile_read_packet, NULL, wtvfile_seek);
241 if (!pb) {241 if (!pb) {
242 av_free(buffer);242 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