summaryrefslogtreecommitdiff
path: root/libavformat/yuv4mpeg.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/yuv4mpeg.c
parent79815f622d90499f882ad968a1351134535cbbab (diff)
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/yuv4mpeg.c')
-rw-r--r--libavformat/yuv4mpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index 9614894caf..7913e417a7 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -87,7 +87,7 @@ static int yuv4_generate_header(AVFormatContext *s, char* buf)
static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
{
AVStream *st = s->streams[pkt->stream_index];
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
AVPicture *picture;
int* first_pkt = s->priv_data;
int width, height, h_chroma_shift, v_chroma_shift;
@@ -190,7 +190,7 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap)
char header[MAX_YUV4_HEADER+10]; // Include headroom for the longest option
char *tokstart,*tokend,*header_end;
int i;
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
int width=-1, height=-1, raten=0, rated=0, aspectn=0, aspectd=0;
enum PixelFormat pix_fmt=PIX_FMT_NONE,alt_pix_fmt=PIX_FMT_NONE;
AVStream *st;
@@ -344,7 +344,7 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket *pkt)
struct frame_attributes *s1 = s->priv_data;
for (i=0; i<MAX_FRAME_HEADER; i++) {
- header[i] = get_byte(&s->pb);
+ header[i] = get_byte(s->pb);
if (header[i] == '\n') {
header[i+1] = 0;
break;
@@ -360,7 +360,7 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket *pkt)
if (packet_size < 0)
return -1;
- if (av_get_packet(&s->pb, pkt, packet_size) != packet_size)
+ if (av_get_packet(s->pb, pkt, packet_size) != packet_size)
return AVERROR(EIO);
if (s->streams[0]->codec->coded_frame) {