Mercurial > libavformat.hg
comparison amr.c @ 154:7f3e6d83abd3 libavformat
amr typefix patch by (Johannes Carlsson <joca at rixmail dot se>)
author | michaelni |
---|---|
date | Wed, 18 Jun 2003 22:24:51 +0000 |
parents | 31d7c9a8678c |
children | 59c2e84817a1 |
comparison
equal
deleted
inserted
replaced
153:41d4f3a86c98 | 154:7f3e6d83abd3 |
---|---|
79 static int amr_read_header(AVFormatContext *s, | 79 static int amr_read_header(AVFormatContext *s, |
80 AVFormatParameters *ap) | 80 AVFormatParameters *ap) |
81 { | 81 { |
82 ByteIOContext *pb = &s->pb; | 82 ByteIOContext *pb = &s->pb; |
83 AVStream *st; | 83 AVStream *st; |
84 u_int8_t header[6]; | 84 uint8_t header[6]; |
85 | 85 |
86 get_buffer(pb, header, 6); | 86 get_buffer(pb, header, 6); |
87 | 87 |
88 if(memcmp(header,AMR_header,6)!=0) | 88 if(memcmp(header,AMR_header,6)!=0) |
89 { | 89 { |
105 #define MAX_SIZE 32 | 105 #define MAX_SIZE 32 |
106 | 106 |
107 static int amr_read_packet(AVFormatContext *s, | 107 static int amr_read_packet(AVFormatContext *s, |
108 AVPacket *pkt) | 108 AVPacket *pkt) |
109 { | 109 { |
110 static u_int16_t packed_size[16] = {12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0}; | 110 static uint16_t packed_size[16] = {12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0}; |
111 u_int8_t toc, q, ft; | 111 uint8_t toc, q, ft; |
112 int read; | 112 int read; |
113 int size; | 113 int size; |
114 | 114 |
115 if (url_feof(&s->pb)) | 115 if (url_feof(&s->pb)) |
116 return -EIO; | 116 return -EIO; |