Mercurial > libavformat.hg
comparison avienc.c @ 969:282e0f799f61 libavformat
check for CODEC_ID_NONE instead 0, tobe compatible with movenc.c and possible CODEC_ID_NONE value change
author | alex |
---|---|
date | Tue, 21 Feb 2006 20:32:47 +0000 |
parents | 0f674f1dd299 |
children | c4a67d8fa68f |
comparison
equal
deleted
inserted
replaced
968:dbf4bc73c7c9 | 969:282e0f799f61 |
---|---|
197 { CODEC_ID_THEORA, MKTAG('t', 'h', 'e', 'o') }, | 197 { CODEC_ID_THEORA, MKTAG('t', 'h', 'e', 'o') }, |
198 { CODEC_ID_TRUEMOTION2, MKTAG('T', 'M', '2', '0') }, | 198 { CODEC_ID_TRUEMOTION2, MKTAG('T', 'M', '2', '0') }, |
199 { CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') }, | 199 { CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') }, |
200 { CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') }, | 200 { CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') }, |
201 { CODEC_ID_RAWVIDEO, 0 }, | 201 { CODEC_ID_RAWVIDEO, 0 }, |
202 { 0, 0 }, | 202 { CODEC_ID_NONE, 0 }, |
203 }; | 203 }; |
204 | 204 |
205 unsigned int codec_get_tag(const CodecTag *tags, int id) | 205 unsigned int codec_get_tag(const CodecTag *tags, int id) |
206 { | 206 { |
207 while (tags->id != 0) { | 207 while (tags->id != CODEC_ID_NONE) { |
208 if (tags->id == id) | 208 if (tags->id == id) |
209 return tags->tag; | 209 return tags->tag; |
210 tags++; | 210 tags++; |
211 } | 211 } |
212 return 0; | 212 return 0; |
213 } | 213 } |
214 | 214 |
215 static unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id) | 215 static unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id) |
216 { | 216 { |
217 while (tags->id != 0) { | 217 while (tags->id != CODEC_ID_NONE) { |
218 if (!tags->invalid_asf && tags->id == id) | 218 if (!tags->invalid_asf && tags->id == id) |
219 return tags->tag; | 219 return tags->tag; |
220 tags++; | 220 tags++; |
221 } | 221 } |
222 return 0; | 222 return 0; |
223 } | 223 } |
224 | 224 |
225 enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag) | 225 enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag) |
226 { | 226 { |
227 while (tags->id != 0) { | 227 while (tags->id != CODEC_ID_NONE) { |
228 if( toupper((tag >> 0)&0xFF) == toupper((tags->tag >> 0)&0xFF) | 228 if( toupper((tag >> 0)&0xFF) == toupper((tags->tag >> 0)&0xFF) |
229 && toupper((tag >> 8)&0xFF) == toupper((tags->tag >> 8)&0xFF) | 229 && toupper((tag >> 8)&0xFF) == toupper((tags->tag >> 8)&0xFF) |
230 && toupper((tag >>16)&0xFF) == toupper((tags->tag >>16)&0xFF) | 230 && toupper((tag >>16)&0xFF) == toupper((tags->tag >>16)&0xFF) |
231 && toupper((tag >>24)&0xFF) == toupper((tags->tag >>24)&0xFF)) | 231 && toupper((tag >>24)&0xFF) == toupper((tags->tag >>24)&0xFF)) |
232 return tags->id; | 232 return tags->id; |