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/gxf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavformat/gxf.c') diff --git a/libavformat/gxf.c b/libavformat/gxf.c index 45467c648e..d4bf6f43be 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -228,7 +228,7 @@ static void gxf_track_tags(ByteIOContext *pb, int *len, st_info_t *si) { * \brief read index from FLT packet into stream 0 av_index */ static void gxf_read_index(AVFormatContext *s, int pkt_len) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; AVStream *st = s->streams[0]; uint32_t fields_per_map = get_le32(pb); uint32_t map_cnt = get_le32(pb); @@ -252,7 +252,7 @@ static void gxf_read_index(AVFormatContext *s, int pkt_len) { } static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; pkt_type_t pkt_type; int map_len; int len; @@ -378,7 +378,7 @@ static int64_t gxf_resync_media(AVFormatContext *s, uint64_t max_interval, int t int cur_track; int64_t cur_timestamp = AV_NOPTS_VALUE; int len; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; pkt_type_t type; tmp = get_be32(pb); start: @@ -408,7 +408,7 @@ out: } static int gxf_packet(AVFormatContext *s, AVPacket *pkt) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; pkt_type_t pkt_type; int pkt_len; while (!url_feof(pb)) { @@ -466,7 +466,7 @@ static int gxf_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int if (idx < st->nb_index_entries - 2) maxlen = st->index_entries[idx + 2].pos - pos; maxlen = FFMAX(maxlen, 200 * 1024); - url_fseek(&s->pb, pos, SEEK_SET); + url_fseek(s->pb, pos, SEEK_SET); found = gxf_resync_media(s, maxlen, -1, timestamp); if (FFABS(found - timestamp) > 4) return -1; @@ -475,7 +475,7 @@ static int gxf_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int static int64_t gxf_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; int64_t res; url_fseek(pb, *pos, SEEK_SET); res = gxf_resync_media(s, pos_limit - *pos, -1, -1); -- cgit v1.2.3