From 899681cd1dbf4cd7c3b86af23bca25e20a54f4d0 Mon Sep 17 00:00:00 2001 From: Björn Axelsson Date: Wed, 21 Nov 2007 07:41:00 +0000 Subject: Use dynamically allocated ByteIOContext in AVFormatContext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- libavformat/4xm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavformat/4xm.c') 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 = -- cgit v1.2.3