summaryrefslogtreecommitdiff
path: root/libavformat/siff.c
diff options
context:
space:
mode:
authorBjörn Axelsson <gecko@acc.umu.se>2007-11-21 07:41:00 +0000
committerAndreas Öman <andreas@lonelycoder.com>2007-11-21 07:41:00 +0000
commit899681cd1dbf4cd7c3b86af23bca25e20a54f4d0 (patch)
tree6f4556497efab1d703d1289b170c936154c6bbd5 /libavformat/siff.c
parent79815f622d90499f882ad968a1351134535cbbab (diff)
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/siff.c')
-rw-r--r--libavformat/siff.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/siff.c b/libavformat/siff.c
index 7adccb2eba..00b4eaa9dd 100644
--- a/libavformat/siff.c
+++ b/libavformat/siff.c
@@ -153,7 +153,7 @@ static int siff_parse_soun(AVFormatContext *s, SIFFContext *c, ByteIOContext *pb
static int siff_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
SIFFContext *c = s->priv_data;
uint32_t tag;
@@ -189,12 +189,12 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt)
if (c->cur_frame >= c->frames)
return AVERROR(EIO);
if (c->curstrm == -1){
- c->pktsize = get_le32(&s->pb) - 4;
- c->flags = get_le16(&s->pb);
+ c->pktsize = get_le32(s->pb) - 4;
+ c->flags = get_le16(s->pb);
c->gmcsize = (c->flags & VB_HAS_GMC) ? 4 : 0;
if (c->gmcsize)
- get_buffer(&s->pb, c->gmc, c->gmcsize);
- c->sndsize = (c->flags & VB_HAS_AUDIO) ? get_le32(&s->pb): 0;
+ get_buffer(s->pb, c->gmc, c->gmcsize);
+ c->sndsize = (c->flags & VB_HAS_AUDIO) ? get_le32(s->pb): 0;
c->curstrm = !!(c->flags & VB_HAS_AUDIO);
}
@@ -205,11 +205,11 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt)
AV_WL16(pkt->data, c->flags);
if (c->gmcsize)
memcpy(pkt->data + 2, c->gmc, c->gmcsize);
- get_buffer(&s->pb, pkt->data + 2 + c->gmcsize, size - c->gmcsize - 2);
+ get_buffer(s->pb, pkt->data + 2 + c->gmcsize, size - c->gmcsize - 2);
pkt->stream_index = 0;
c->curstrm = -1;
}else{
- if (av_get_packet(&s->pb, pkt, c->sndsize - 4) < 0)
+ if (av_get_packet(s->pb, pkt, c->sndsize - 4) < 0)
return AVERROR(EIO);
pkt->stream_index = 1;
c->curstrm = 0;
@@ -219,7 +219,7 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt)
if (c->curstrm == -1)
c->cur_frame++;
}else{
- size = av_get_packet(&s->pb, pkt, c->block_align);
+ size = av_get_packet(s->pb, pkt, c->block_align);
if(size <= 0)
return AVERROR(EIO);
}