From 899681cd1dbf4cd7c3b86af23bca25e20a54f4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Axelsson?= 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/libnut.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libavformat/libnut.c') diff --git a/libavformat/libnut.c b/libavformat/libnut.c index f70a458b65..f5423069f1 100644 --- a/libavformat/libnut.c +++ b/libavformat/libnut.c @@ -54,7 +54,7 @@ static int av_write(void * h, size_t len, const uint8_t * buf) { static int nut_write_header(AVFormatContext * avf) { NUTContext * priv = avf->priv_data; - ByteIOContext * bc = &avf->pb; + ByteIOContext * bc = avf->pb; nut_muxer_opts_t mopts = { .output = { .priv = bc, @@ -137,7 +137,7 @@ static int nut_write_packet(AVFormatContext * avf, AVPacket * pkt) { } static int nut_write_trailer(AVFormatContext * avf) { - ByteIOContext * bc = &avf->pb; + ByteIOContext * bc = avf->pb; NUTContext * priv = avf->priv_data; int i; @@ -187,7 +187,7 @@ static off_t av_seek(void * h, long long pos, int whence) { static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) { NUTContext * priv = avf->priv_data; - ByteIOContext * bc = &avf->pb; + ByteIOContext * bc = avf->pb; nut_demuxer_opts_t dopts = { .input = { .priv = bc, @@ -272,7 +272,7 @@ static int nut_read_packet(AVFormatContext * avf, AVPacket * pkt) { if (pd.flags & NUT_FLAG_KEY) pkt->flags |= PKT_FLAG_KEY; pkt->pts = pd.pts; pkt->stream_index = pd.stream; - pkt->pos = url_ftell(&avf->pb); + pkt->pos = url_ftell(avf->pb); ret = nut_read_frame(priv->nut, &pd.len, pkt->data); -- cgit v1.2.3