Commit c5ffec50 authored by alex's avatar alex

check for CODEC_ID_NONE instead 0, tobe compatible with movenc.c and possible...

check for CODEC_ID_NONE instead 0, tobe compatible with movenc.c and possible CODEC_ID_NONE value change


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5043 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 78e01900
...@@ -199,12 +199,12 @@ const CodecTag codec_bmp_tags[] = { ...@@ -199,12 +199,12 @@ const CodecTag codec_bmp_tags[] = {
{ CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') }, { CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') },
{ CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') }, { CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') },
{ CODEC_ID_RAWVIDEO, 0 }, { CODEC_ID_RAWVIDEO, 0 },
{ 0, 0 }, { CODEC_ID_NONE, 0 },
}; };
unsigned int codec_get_tag(const CodecTag *tags, int id) unsigned int codec_get_tag(const CodecTag *tags, int id)
{ {
while (tags->id != 0) { while (tags->id != CODEC_ID_NONE) {
if (tags->id == id) if (tags->id == id)
return tags->tag; return tags->tag;
tags++; tags++;
...@@ -214,7 +214,7 @@ unsigned int codec_get_tag(const CodecTag *tags, int id) ...@@ -214,7 +214,7 @@ unsigned int codec_get_tag(const CodecTag *tags, int id)
static unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id) static unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id)
{ {
while (tags->id != 0) { while (tags->id != CODEC_ID_NONE) {
if (!tags->invalid_asf && tags->id == id) if (!tags->invalid_asf && tags->id == id)
return tags->tag; return tags->tag;
tags++; tags++;
...@@ -224,7 +224,7 @@ static unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id) ...@@ -224,7 +224,7 @@ static unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id)
enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag) enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag)
{ {
while (tags->id != 0) { while (tags->id != CODEC_ID_NONE) {
if( toupper((tag >> 0)&0xFF) == toupper((tags->tag >> 0)&0xFF) if( toupper((tag >> 0)&0xFF) == toupper((tags->tag >> 0)&0xFF)
&& toupper((tag >> 8)&0xFF) == toupper((tags->tag >> 8)&0xFF) && toupper((tag >> 8)&0xFF) == toupper((tags->tag >> 8)&0xFF)
&& toupper((tag >>16)&0xFF) == toupper((tags->tag >>16)&0xFF) && toupper((tag >>16)&0xFF) == toupper((tags->tag >>16)&0xFF)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment