diff options
author | Björn Axelsson <gecko@acc.umu.se> | 2007-11-21 07:41:00 +0000 |
---|---|---|
committer | Andreas Öman <andreas@lonelycoder.com> | 2007-11-21 07:41:00 +0000 |
commit | 899681cd1dbf4cd7c3b86af23bca25e20a54f4d0 (patch) | |
tree | 6f4556497efab1d703d1289b170c936154c6bbd5 /libavformat/ape.c | |
parent | 79815f622d90499f882ad968a1351134535cbbab (diff) | |
download | ffmpeg-899681cd1dbf4cd7c3b86af23bca25e20a54f4d0.tar.gz |
Use dynamically allocated ByteIOContext in AVFormatContext
patch by: Björn Axelsson, bjorn d axelsson a intinor d se
thread: [PATCH] Remove static ByteIOContexts, 06 nov 2007
Originally committed as revision 11071 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ape.c')
-rw-r--r-- | libavformat/ape.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c index 54ffa9e1ec..358ad2e8b2 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -110,7 +110,7 @@ typedef struct { static void ape_tag_read_field(AVFormatContext *s) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; uint8_t buf[1024]; uint32_t size; int i; @@ -143,7 +143,7 @@ static void ape_tag_read_field(AVFormatContext *s) static void ape_parse_tag(AVFormatContext *s) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; int file_size = url_fsize(pb); uint32_t val, fields, tag_bytes; uint8_t buf[8]; @@ -270,7 +270,7 @@ static void ape_dumpinfo(APEContext * ape_ctx) static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; APEContext *ape = s->priv_data; AVStream *st; uint32_t tag; @@ -456,12 +456,12 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt) APEContext *ape = s->priv_data; uint32_t extra_size = 8; - if (url_feof(&s->pb)) + if (url_feof(s->pb)) return AVERROR_IO; if (ape->currentframe > ape->totalframes) return AVERROR_IO; - url_fseek (&s->pb, ape->frames[ape->currentframe].pos, SEEK_SET); + url_fseek (s->pb, ape->frames[ape->currentframe].pos, SEEK_SET); /* Calculate how many blocks there are in this frame */ if (ape->currentframe == (ape->totalframes - 1)) @@ -474,7 +474,7 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt) AV_WL32(pkt->data , nblocks); AV_WL32(pkt->data + 4, ape->frames[ape->currentframe].skip); - ret = get_buffer(&s->pb, pkt->data + extra_size, ape->frames[ape->currentframe].size); + ret = get_buffer(s->pb, pkt->data + extra_size, ape->frames[ape->currentframe].size); pkt->pts = ape->frames[ape->currentframe].pts; pkt->stream_index = 0; |