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/rmenc.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/rmenc.c')
-rw-r--r-- | libavformat/rmenc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index 74f944317c..57a4e757de 100644 --- a/libavformat/rmenc.c +++ b/libavformat/rmenc.c @@ -45,7 +45,7 @@ static void rv10_write_header(AVFormatContext *ctx, int data_size, int index_pos) { RMContext *rm = ctx->priv_data; - ByteIOContext *s = &ctx->pb; + ByteIOContext *s = ctx->pb; StreamInfo *stream; unsigned char *data_offset_ptr, *start_ptr; const char *desc, *mimetype; @@ -253,7 +253,7 @@ static void write_packet_header(AVFormatContext *ctx, StreamInfo *stream, int length, int key_frame) { int timestamp; - ByteIOContext *s = &ctx->pb; + ByteIOContext *s = ctx->pb; stream->nb_packets++; stream->packet_total_size += length; @@ -308,7 +308,7 @@ static int rm_write_header(AVFormatContext *s) } rv10_write_header(s, 0, 0); - put_flush_packet(&s->pb); + put_flush_packet(s->pb); return 0; } @@ -316,7 +316,7 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int { uint8_t *buf1; RMContext *rm = s->priv_data; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; StreamInfo *stream = rm->audio_stream; int i; @@ -340,7 +340,7 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int flags) { RMContext *rm = s->priv_data; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; StreamInfo *stream = rm->video_stream; int key_frame = !!(flags & PKT_FLAG_KEY); @@ -390,9 +390,9 @@ static int rm_write_trailer(AVFormatContext *s) { RMContext *rm = s->priv_data; int data_size, index_pos, i; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; - if (!url_is_streamed(&s->pb)) { + if (!url_is_streamed(s->pb)) { /* end of file: finish to write header */ index_pos = url_fseek(pb, 0, SEEK_CUR); data_size = index_pos - rm->data_pos; |