summaryrefslogtreecommitdiff
path: root/libavformat/4xm.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/4xm.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/4xm.c')
-rw-r--r--libavformat/4xm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 5f982e3c88..151e9c9c81 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -92,7 +92,7 @@ static int fourxm_probe(AVProbeData *p)
static int fourxm_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
unsigned int fourcc_tag;
unsigned int size;
int header_size;
@@ -224,7 +224,7 @@ static int fourxm_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
FourxmDemuxContext *fourxm = s->priv_data;
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
unsigned int fourcc_tag;
unsigned int size, out_size;
int ret = 0;
@@ -235,7 +235,7 @@ static int fourxm_read_packet(AVFormatContext *s,
while (!packet_read) {
- if ((ret = get_buffer(&s->pb, header, 8)) < 0)
+ if ((ret = get_buffer(s->pb, header, 8)) < 0)
return ret;
fourcc_tag = AV_RL32(&header[0]);
size = AV_RL32(&header[4]);
@@ -265,9 +265,9 @@ static int fourxm_read_packet(AVFormatContext *s,
return AVERROR(EIO);
pkt->stream_index = fourxm->video_stream_index;
pkt->pts = fourxm->video_pts;
- pkt->pos = url_ftell(&s->pb);
+ pkt->pos = url_ftell(s->pb);
memcpy(pkt->data, header, 8);
- ret = get_buffer(&s->pb, &pkt->data[8], size);
+ ret = get_buffer(s->pb, &pkt->data[8], size);
if (ret < 0)
av_free_packet(pkt);
@@ -282,7 +282,7 @@ static int fourxm_read_packet(AVFormatContext *s,
size-=8;
if (track_number == fourxm->selected_track) {
- ret= av_get_packet(&s->pb, pkt, size);
+ ret= av_get_packet(s->pb, pkt, size);
if(ret<0)
return AVERROR(EIO);
pkt->stream_index =