Mercurial > libavformat.hg
diff au.c @ 2771:d52c718e83f9 libavformat
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
author | andoma |
---|---|
date | Wed, 21 Nov 2007 07:41:00 +0000 |
parents | 213268d7594e |
children | 473906f5a3b9 |
line wrap: on
line diff
--- a/au.c Mon Nov 19 20:28:11 2007 +0000 +++ b/au.c Wed Nov 21 07:41:00 2007 +0000 @@ -59,7 +59,7 @@ static int au_write_header(AVFormatContext *s) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; s->priv_data = NULL; @@ -75,17 +75,17 @@ static int au_write_packet(AVFormatContext *s, AVPacket *pkt) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; put_buffer(pb, pkt->data, pkt->size); return 0; } static int au_write_trailer(AVFormatContext *s) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; offset_t file_size; - if (!url_is_streamed(&s->pb)) { + if (!url_is_streamed(s->pb)) { /* update file size */ file_size = url_ftell(pb); @@ -116,7 +116,7 @@ { int size; unsigned int tag; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; unsigned int id, codec, channels, rate; AVStream *st; @@ -158,9 +158,9 @@ { int ret; - if (url_feof(&s->pb)) + if (url_feof(s->pb)) return AVERROR(EIO); - ret= av_get_packet(&s->pb, pkt, MAX_SIZE); + ret= av_get_packet(s->pb, pkt, MAX_SIZE); if (ret < 0) return AVERROR(EIO); pkt->stream_index = 0;