diff options
author | Björn Axelsson <gecko@acc.umu.se> | 2007-11-21 07:41:00 +0000 |
---|---|---|
committer | Andreas Öman <andreas@lonelycoder.com> | 2007-11-21 07:41:00 +0000 |
commit | 899681cd1dbf4cd7c3b86af23bca25e20a54f4d0 (patch) | |
tree | 6f4556497efab1d703d1289b170c936154c6bbd5 /libavformat/avienc.c | |
parent | 79815f622d90499f882ad968a1351134535cbbab (diff) | |
download | ffmpeg-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/avienc.c')
-rw-r--r-- | libavformat/avienc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c index 8f379e9b8c..6b62f76d8d 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -105,7 +105,7 @@ static void avi_write_info_tag(ByteIOContext *pb, const char *tag, const char *s static int avi_write_counters(AVFormatContext* s, int riff_id) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; AVIContext *avi = s->priv_data; int n, au_byterate, au_ssize, au_scale, nb_frames = 0; offset_t file_size; @@ -138,7 +138,7 @@ static int avi_write_counters(AVFormatContext* s, int riff_id) static int avi_write_header(AVFormatContext *s) { AVIContext *avi = s->priv_data; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; int bitrate, n, i, nb_frames, au_byterate, au_ssize, au_scale; AVCodecContext *stream, *video_enc; offset_t list1, list2, strh, strf; @@ -332,7 +332,7 @@ static int avi_write_header(AVFormatContext *s) static int avi_write_ix(AVFormatContext *s) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; AVIContext *avi = s->priv_data; char tag[5]; char ix_tag[] = "ix00"; @@ -389,7 +389,7 @@ static int avi_write_ix(AVFormatContext *s) static int avi_write_idx1(AVFormatContext *s) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; AVIContext *avi = s->priv_data; offset_t idx_chunk; int i; @@ -435,7 +435,7 @@ static int avi_write_idx1(AVFormatContext *s) static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) { AVIContext *avi = s->priv_data; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; unsigned char tag[5]; unsigned int flags=0; const int stream_index= pkt->stream_index; @@ -476,7 +476,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) avi->audio_strm_length[stream_index] += size; } - if (!url_is_streamed(&s->pb)) { + if (!url_is_streamed(s->pb)) { AVIIndex* idx = &avi->indexes[stream_index]; int cl = idx->entry / AVI_INDEX_CLUSTER_SIZE; int id = idx->entry % AVI_INDEX_CLUSTER_SIZE; @@ -509,7 +509,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) static int avi_write_trailer(AVFormatContext *s) { AVIContext *avi = s->priv_data; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; int res = 0; int i, j, n, nb_frames; offset_t file_size; |