changeset 4019:a2539db62994 libavformat

Fix argument constness for the av_codec_get_id() and av_codec_get_tag() functions, making them take in input a constant array, since they're not supposed to change it. Fix some warnings.
author stefano
date Sat, 08 Nov 2008 18:37:03 +0000
parents 0c2f650d31bb
children 9d94163ca066
files avformat.h utils.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/avformat.h	Sat Nov 08 00:39:31 2008 +0000
+++ b/avformat.h	Sat Nov 08 18:37:03 2008 +0000
@@ -694,8 +694,8 @@
 void av_register_all(void);
 
 /** codec tag <-> codec id */
-enum CodecID av_codec_get_id(const struct AVCodecTag **tags, unsigned int tag);
-unsigned int av_codec_get_tag(const struct AVCodecTag **tags, enum CodecID id);
+enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
+unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecID id);
 
 /* media file input */
 
--- a/utils.c	Sat Nov 08 00:39:31 2008 +0000
+++ b/utils.c	Sat Nov 08 18:37:03 2008 +0000
@@ -1938,7 +1938,7 @@
     return CODEC_ID_NONE;
 }
 
-unsigned int av_codec_get_tag(const AVCodecTag *tags[4], enum CodecID id)
+unsigned int av_codec_get_tag(const AVCodecTag * const *tags, enum CodecID id)
 {
     int i;
     for(i=0; tags && tags[i]; i++){
@@ -1948,7 +1948,7 @@
     return 0;
 }
 
-enum CodecID av_codec_get_id(const AVCodecTag *tags[4], unsigned int tag)
+enum CodecID av_codec_get_id(const AVCodecTag * const *tags, unsigned int tag)
 {
     int i;
     for(i=0; tags && tags[i]; i++){