Mercurial > libavformat.hg
comparison vocdec.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 | 3c1e2d519277 |
children | 7a0230981402 |
comparison
equal
deleted
inserted
replaced
2770:a7e42cf4b364 | 2771:d52c718e83f9 |
---|---|
37 } | 37 } |
38 | 38 |
39 static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) | 39 static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) |
40 { | 40 { |
41 voc_dec_context_t *voc = s->priv_data; | 41 voc_dec_context_t *voc = s->priv_data; |
42 ByteIOContext *pb = &s->pb; | 42 ByteIOContext *pb = s->pb; |
43 int header_size; | 43 int header_size; |
44 AVStream *st; | 44 AVStream *st; |
45 | 45 |
46 url_fskip(pb, 20); | 46 url_fskip(pb, 20); |
47 header_size = get_le16(pb) - 22; | 47 header_size = get_le16(pb) - 22; |
62 int | 62 int |
63 voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) | 63 voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) |
64 { | 64 { |
65 voc_dec_context_t *voc = s->priv_data; | 65 voc_dec_context_t *voc = s->priv_data; |
66 AVCodecContext *dec = st->codec; | 66 AVCodecContext *dec = st->codec; |
67 ByteIOContext *pb = &s->pb; | 67 ByteIOContext *pb = s->pb; |
68 voc_type_t type; | 68 voc_type_t type; |
69 int size; | 69 int size; |
70 int sample_rate = 0; | 70 int sample_rate = 0; |
71 int channels = 1; | 71 int channels = 1; |
72 | 72 |