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/mmf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libavformat/mmf.c') diff --git a/libavformat/mmf.c b/libavformat/mmf.c index be4c6e3cca..84c21a01d2 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -60,7 +60,7 @@ static void end_tag_be(ByteIOContext *pb, offset_t start) static int mmf_write_header(AVFormatContext *s) { MMFContext *mmf = s->priv_data; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; offset_t pos; int rate; @@ -108,7 +108,7 @@ static int mmf_write_header(AVFormatContext *s) static int mmf_write_packet(AVFormatContext *s, AVPacket *pkt) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; put_buffer(pb, pkt->data, pkt->size); return 0; } @@ -127,12 +127,12 @@ static void put_varlength(ByteIOContext *pb, int val) static int mmf_write_trailer(AVFormatContext *s) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; MMFContext *mmf = s->priv_data; offset_t pos, size; int gatetime; - if (!url_is_streamed(&s->pb)) { + if (!url_is_streamed(s->pb)) { /* Fill in length fields */ end_tag_be(pb, mmf->awapos); end_tag_be(pb, mmf->atrpos); @@ -183,7 +183,7 @@ static int mmf_read_header(AVFormatContext *s, { MMFContext *mmf = s->priv_data; unsigned int tag; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; AVStream *st; offset_t file_size, size; int rate, params; @@ -265,7 +265,7 @@ static int mmf_read_packet(AVFormatContext *s, AVStream *st; int ret, size; - if (url_feof(&s->pb)) + if (url_feof(s->pb)) return AVERROR(EIO); st = s->streams[0]; @@ -280,7 +280,7 @@ static int mmf_read_packet(AVFormatContext *s, return AVERROR(EIO); pkt->stream_index = 0; - ret = get_buffer(&s->pb, pkt->data, pkt->size); + ret = get_buffer(s->pb, pkt->data, pkt->size); if (ret < 0) av_free_packet(pkt); -- cgit v1.2.3