summaryrefslogtreecommitdiff
path: root/libavformat/aiff.c
diff options
context:
space:
mode:
authorBjörn Axelsson <gecko@acc.umu.se>2007-11-21 07:41:00 +0000
committerAndreas Öman <andreas@lonelycoder.com>2007-11-21 07:41:00 +0000
commit899681cd1dbf4cd7c3b86af23bca25e20a54f4d0 (patch)
tree6f4556497efab1d703d1289b170c936154c6bbd5 /libavformat/aiff.c
parent79815f622d90499f882ad968a1351134535cbbab (diff)
downloadffmpeg-899681cd1dbf4cd7c3b86af23bca25e20a54f4d0.tar.gz
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 Originally committed as revision 11071 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aiff.c')
-rw-r--r--libavformat/aiff.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/aiff.c b/libavformat/aiff.c
index ea98554654..f840c176da 100644
--- a/libavformat/aiff.c
+++ b/libavformat/aiff.c
@@ -161,7 +161,7 @@ typedef struct {
static int aiff_write_header(AVFormatContext *s)
{
AIFFOutputContext *aiff = s->priv_data;
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
AVCodecContext *enc = s->streams[0]->codec;
AVExtFloat sample_rate;
int aifc = 0;
@@ -231,14 +231,14 @@ static int aiff_write_header(AVFormatContext *s)
static int aiff_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 aiff_write_trailer(AVFormatContext *s)
{
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
AIFFOutputContext *aiff = s->priv_data;
AVCodecContext *enc = s->streams[0]->codec;
@@ -250,7 +250,7 @@ static int aiff_write_trailer(AVFormatContext *s)
end_size++;
}
- if (!url_is_streamed(&s->pb)) {
+ if (!url_is_streamed(s->pb)) {
/* File length */
url_fseek(pb, aiff->form, SEEK_SET);
put_be32(pb, (uint32_t)(file_size - aiff->form - 4));
@@ -293,7 +293,7 @@ static int aiff_read_header(AVFormatContext *s,
offset_t offset = 0;
uint32_t tag;
unsigned version = AIFF_C_VERSION1;
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
AVStream * st = s->streams[0];
/* check FORM header */
@@ -399,11 +399,11 @@ static int aiff_read_packet(AVFormatContext *s,
int res;
/* End of stream may be reached */
- if (url_feof(&s->pb))
+ if (url_feof(s->pb))
return AVERROR(EIO);
/* Now for that packet */
- res = av_get_packet(&s->pb, pkt, (MAX_SIZE / st->codec->block_align) * st->codec->block_align);
+ res = av_get_packet(s->pb, pkt, (MAX_SIZE / st->codec->block_align) * st->codec->block_align);
if (res < 0)
return res;