Mercurial > libavformat.hg
comparison apc.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 | b21c2af60bc9 |
children | 7e3332b84926 |
comparison
equal
deleted
inserted
replaced
2770:a7e42cf4b364 | 2771:d52c718e83f9 |
---|---|
30 return 0; | 30 return 0; |
31 } | 31 } |
32 | 32 |
33 static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap) | 33 static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap) |
34 { | 34 { |
35 ByteIOContext *pb = &s->pb; | 35 ByteIOContext *pb = s->pb; |
36 AVStream *st; | 36 AVStream *st; |
37 | 37 |
38 get_le32(pb); /* CRYO */ | 38 get_le32(pb); /* CRYO */ |
39 get_le32(pb); /* _APC */ | 39 get_le32(pb); /* _APC */ |
40 get_le32(pb); /* 1.20 */ | 40 get_le32(pb); /* 1.20 */ |
72 | 72 |
73 #define MAX_READ_SIZE 4096 | 73 #define MAX_READ_SIZE 4096 |
74 | 74 |
75 static int apc_read_packet(AVFormatContext *s, AVPacket *pkt) | 75 static int apc_read_packet(AVFormatContext *s, AVPacket *pkt) |
76 { | 76 { |
77 if (av_get_packet(&s->pb, pkt, MAX_READ_SIZE) <= 0) | 77 if (av_get_packet(s->pb, pkt, MAX_READ_SIZE) <= 0) |
78 return AVERROR(EIO); | 78 return AVERROR(EIO); |
79 pkt->stream_index = 0; | 79 pkt->stream_index = 0; |
80 return 0; | 80 return 0; |
81 } | 81 } |
82 | 82 |