OSDN Git Service

* more strict types
authorZdenek Kabelac <kabi@informatics.muni.cz>
Wed, 23 Apr 2003 08:56:14 +0000 (08:56 +0000)
committerZdenek Kabelac <kabi@informatics.muni.cz>
Wed, 23 Apr 2003 08:56:14 +0000 (08:56 +0000)
Originally committed as revision 1815 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/avcodec.h
libavformat/avi.h
libavformat/avienc.c

index 4c2ead7..f01a7de 100644 (file)
@@ -1141,7 +1141,7 @@ int avoption_parse(void* strct, const AVOption* list, const char* opts);
  */
 typedef struct AVCodec {
     const char *name;
-    int type;
+    enum CodecType type;
     int id;
     int priv_data_size;
     int (*init)(AVCodecContext *);
index 193c581..73a4303 100644 (file)
@@ -27,4 +27,5 @@ extern const CodecTag codec_bmp_tags[];
 extern const CodecTag codec_wav_tags[];
 
 unsigned int codec_get_tag(const CodecTag *tags, int id);
-int codec_get_id(const CodecTag *tags, unsigned int tag);
+enum CodecID;
+enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag);
index f7017a1..2194af0 100644 (file)
@@ -185,14 +185,14 @@ static unsigned int codec_get_asf_tag(const CodecTag *tags, int id)
     return 0;
 }
 
-int codec_get_id(const CodecTag *tags, unsigned int tag)
+enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag)
 {
     while (tags->id != 0) {
         if (tags->tag == tag)
             return tags->id;
         tags++;
     }
-    return 0;
+    return CODEC_ID_NONE;
 }
 
 unsigned int codec_get_bmp_tag(int id)